// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: message.proto

package com.netty.client.protocol;

public final class MessageBuf {
  private MessageBuf() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface MessageOrBuilder extends
      // @@protoc_insertion_point(interface_extends:Message)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * 包类型
     * </pre>
     *
     * <code>.Message.PackType packType = 1;</code>
     * @return The enum numeric value on the wire for packType.
     */
    int getPackTypeValue();
    /**
     * <pre>
     * 包类型
     * </pre>
     *
     * <code>.Message.PackType packType = 1;</code>
     * @return The packType.
     */
    com.netty.client.protocol.MessageBuf.Message.PackType getPackType();

    /**
     * <code>.LoginRequest loginRequest = 2;</code>
     * @return Whether the loginRequest field is set.
     */
    boolean hasLoginRequest();
    /**
     * <code>.LoginRequest loginRequest = 2;</code>
     * @return The loginRequest.
     */
    com.netty.client.protocol.MessageBuf.LoginRequest getLoginRequest();
    /**
     * <code>.LoginRequest loginRequest = 2;</code>
     */
    com.netty.client.protocol.MessageBuf.LoginRequestOrBuilder getLoginRequestOrBuilder();

    /**
     * <code>.LoginResponse loginResponse = 3;</code>
     * @return Whether the loginResponse field is set.
     */
    boolean hasLoginResponse();
    /**
     * <code>.LoginResponse loginResponse = 3;</code>
     * @return The loginResponse.
     */
    com.netty.client.protocol.MessageBuf.LoginResponse getLoginResponse();
    /**
     * <code>.LoginResponse loginResponse = 3;</code>
     */
    com.netty.client.protocol.MessageBuf.LoginResponseOrBuilder getLoginResponseOrBuilder();

    /**
     * <code>.MessageRequest messageRequest = 4;</code>
     * @return Whether the messageRequest field is set.
     */
    boolean hasMessageRequest();
    /**
     * <code>.MessageRequest messageRequest = 4;</code>
     * @return The messageRequest.
     */
    com.netty.client.protocol.MessageBuf.MessageRequest getMessageRequest();
    /**
     * <code>.MessageRequest messageRequest = 4;</code>
     */
    com.netty.client.protocol.MessageBuf.MessageRequestOrBuilder getMessageRequestOrBuilder();

    /**
     * <code>.MessageResponse messageResponse = 5;</code>
     * @return Whether the messageResponse field is set.
     */
    boolean hasMessageResponse();
    /**
     * <code>.MessageResponse messageResponse = 5;</code>
     * @return The messageResponse.
     */
    com.netty.client.protocol.MessageBuf.MessageResponse getMessageResponse();
    /**
     * <code>.MessageResponse messageResponse = 5;</code>
     */
    com.netty.client.protocol.MessageBuf.MessageResponseOrBuilder getMessageResponseOrBuilder();

    public com.netty.client.protocol.MessageBuf.Message.PackCase getPackCase();
  }
  /**
   * <pre>
   * 消息整合，便于netty导入解码器
   * </pre>
   *
   * Protobuf type {@code Message}
   */
  public static final class Message extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:Message)
      MessageOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use Message.newBuilder() to construct.
    private Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Message() {
      packType_ = 0;
    }

    @Override
    @SuppressWarnings({"unused"})
    protected Object newInstance(
        UnusedPrivateParameter unused) {
      return new Message();
    }

    @Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private Message(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new NullPointerException();
      }
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              int rawValue = input.readEnum();

              packType_ = rawValue;
              break;
            }
            case 18: {
              com.netty.client.protocol.MessageBuf.LoginRequest.Builder subBuilder = null;
              if (packCase_ == 2) {
                subBuilder = ((com.netty.client.protocol.MessageBuf.LoginRequest) pack_).toBuilder();
              }
              pack_ =
                  input.readMessage(com.netty.client.protocol.MessageBuf.LoginRequest.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((com.netty.client.protocol.MessageBuf.LoginRequest) pack_);
                pack_ = subBuilder.buildPartial();
              }
              packCase_ = 2;
              break;
            }
            case 26: {
              com.netty.client.protocol.MessageBuf.LoginResponse.Builder subBuilder = null;
              if (packCase_ == 3) {
                subBuilder = ((com.netty.client.protocol.MessageBuf.LoginResponse) pack_).toBuilder();
              }
              pack_ =
                  input.readMessage(com.netty.client.protocol.MessageBuf.LoginResponse.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((com.netty.client.protocol.MessageBuf.LoginResponse) pack_);
                pack_ = subBuilder.buildPartial();
              }
              packCase_ = 3;
              break;
            }
            case 34: {
              com.netty.client.protocol.MessageBuf.MessageRequest.Builder subBuilder = null;
              if (packCase_ == 4) {
                subBuilder = ((com.netty.client.protocol.MessageBuf.MessageRequest) pack_).toBuilder();
              }
              pack_ =
                  input.readMessage(com.netty.client.protocol.MessageBuf.MessageRequest.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((com.netty.client.protocol.MessageBuf.MessageRequest) pack_);
                pack_ = subBuilder.buildPartial();
              }
              packCase_ = 4;
              break;
            }
            case 42: {
              com.netty.client.protocol.MessageBuf.MessageResponse.Builder subBuilder = null;
              if (packCase_ == 5) {
                subBuilder = ((com.netty.client.protocol.MessageBuf.MessageResponse) pack_).toBuilder();
              }
              pack_ =
                  input.readMessage(com.netty.client.protocol.MessageBuf.MessageResponse.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((com.netty.client.protocol.MessageBuf.MessageResponse) pack_);
                pack_ = subBuilder.buildPartial();
              }
              packCase_ = 5;
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.netty.client.protocol.MessageBuf.internal_static_Message_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.netty.client.protocol.MessageBuf.internal_static_Message_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.netty.client.protocol.MessageBuf.Message.class, com.netty.client.protocol.MessageBuf.Message.Builder.class);
    }

    /**
     * Protobuf enum {@code Message.PackType}
     */
    public enum PackType
        implements com.google.protobuf.ProtocolMessageEnum {
      /**
       * <code>LOGIN_REQ = 0;</code>
       */
      LOGIN_REQ(0),
      /**
       * <code>LOGIN_RESP = 1;</code>
       */
      LOGIN_RESP(1),
      /**
       * <code>MESSAGE_REQ = 2;</code>
       */
      MESSAGE_REQ(2),
      /**
       * <code>MESSAGE_RESP = 3;</code>
       */
      MESSAGE_RESP(3),
      UNRECOGNIZED(-1),
      ;

      /**
       * <code>LOGIN_REQ = 0;</code>
       */
      public static final int LOGIN_REQ_VALUE = 0;
      /**
       * <code>LOGIN_RESP = 1;</code>
       */
      public static final int LOGIN_RESP_VALUE = 1;
      /**
       * <code>MESSAGE_REQ = 2;</code>
       */
      public static final int MESSAGE_REQ_VALUE = 2;
      /**
       * <code>MESSAGE_RESP = 3;</code>
       */
      public static final int MESSAGE_RESP_VALUE = 3;


      public final int getNumber() {
        if (this == UNRECOGNIZED) {
          throw new IllegalArgumentException(
              "Can't get the number of an unknown enum value.");
        }
        return value;
      }

      /**
       * @param value The numeric wire value of the corresponding enum entry.
       * @return The enum associated with the given numeric wire value.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @Deprecated
      public static PackType valueOf(int value) {
        return forNumber(value);
      }

      /**
       * @param value The numeric wire value of the corresponding enum entry.
       * @return The enum associated with the given numeric wire value.
       */
      public static PackType forNumber(int value) {
        switch (value) {
          case 0: return LOGIN_REQ;
          case 1: return LOGIN_RESP;
          case 2: return MESSAGE_REQ;
          case 3: return MESSAGE_RESP;
          default: return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap<PackType>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static final com.google.protobuf.Internal.EnumLiteMap<
          PackType> internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<PackType>() {
              public PackType findValueByNumber(int number) {
                return PackType.forNumber(number);
              }
            };

      public final com.google.protobuf.Descriptors.EnumValueDescriptor
          getValueDescriptor() {
        if (this == UNRECOGNIZED) {
          throw new IllegalStateException(
              "Can't get the descriptor of an unrecognized enum value.");
        }
        return getDescriptor().getValues().get(ordinal());
      }
      public final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptorForType() {
        return getDescriptor();
      }
      public static final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptor() {
        return com.netty.client.protocol.MessageBuf.Message.getDescriptor().getEnumTypes().get(0);
      }

      private static final PackType[] VALUES = values();

      public static PackType valueOf(
          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
        if (desc.getType() != getDescriptor()) {
          throw new IllegalArgumentException(
            "EnumValueDescriptor is not for this type.");
        }
        if (desc.getIndex() == -1) {
          return UNRECOGNIZED;
        }
        return VALUES[desc.getIndex()];
      }

      private final int value;

      private PackType(int value) {
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:Message.PackType)
    }

    private int packCase_ = 0;
    private Object pack_;
    public enum PackCase
        implements com.google.protobuf.Internal.EnumLite,
            InternalOneOfEnum {
      LOGINREQUEST(2),
      LOGINRESPONSE(3),
      MESSAGEREQUEST(4),
      MESSAGERESPONSE(5),
      PACK_NOT_SET(0);
      private final int value;
      private PackCase(int value) {
        this.value = value;
      }
      /**
       * @param value The number of the enum to look for.
       * @return The enum associated with the given number.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @Deprecated
      public static PackCase valueOf(int value) {
        return forNumber(value);
      }

      public static PackCase forNumber(int value) {
        switch (value) {
          case 2: return LOGINREQUEST;
          case 3: return LOGINRESPONSE;
          case 4: return MESSAGEREQUEST;
          case 5: return MESSAGERESPONSE;
          case 0: return PACK_NOT_SET;
          default: return null;
        }
      }
      public int getNumber() {
        return this.value;
      }
    };

    public PackCase
    getPackCase() {
      return PackCase.forNumber(
          packCase_);
    }

    public static final int PACKTYPE_FIELD_NUMBER = 1;
    private int packType_;
    /**
     * <pre>
     * 包类型
     * </pre>
     *
     * <code>.Message.PackType packType = 1;</code>
     * @return The enum numeric value on the wire for packType.
     */
    @Override public int getPackTypeValue() {
      return packType_;
    }
    /**
     * <pre>
     * 包类型
     * </pre>
     *
     * <code>.Message.PackType packType = 1;</code>
     * @return The packType.
     */
    @Override public com.netty.client.protocol.MessageBuf.Message.PackType getPackType() {
      @SuppressWarnings("deprecation")
      com.netty.client.protocol.MessageBuf.Message.PackType result = com.netty.client.protocol.MessageBuf.Message.PackType.valueOf(packType_);
      return result == null ? com.netty.client.protocol.MessageBuf.Message.PackType.UNRECOGNIZED : result;
    }

    public static final int LOGINREQUEST_FIELD_NUMBER = 2;
    /**
     * <code>.LoginRequest loginRequest = 2;</code>
     * @return Whether the loginRequest field is set.
     */
    @Override
    public boolean hasLoginRequest() {
      return packCase_ == 2;
    }
    /**
     * <code>.LoginRequest loginRequest = 2;</code>
     * @return The loginRequest.
     */
    @Override
    public com.netty.client.protocol.MessageBuf.LoginRequest getLoginRequest() {
      if (packCase_ == 2) {
         return (com.netty.client.protocol.MessageBuf.LoginRequest) pack_;
      }
      return com.netty.client.protocol.MessageBuf.LoginRequest.getDefaultInstance();
    }
    /**
     * <code>.LoginRequest loginRequest = 2;</code>
     */
    @Override
    public com.netty.client.protocol.MessageBuf.LoginRequestOrBuilder getLoginRequestOrBuilder() {
      if (packCase_ == 2) {
         return (com.netty.client.protocol.MessageBuf.LoginRequest) pack_;
      }
      return com.netty.client.protocol.MessageBuf.LoginRequest.getDefaultInstance();
    }

    public static final int LOGINRESPONSE_FIELD_NUMBER = 3;
    /**
     * <code>.LoginResponse loginResponse = 3;</code>
     * @return Whether the loginResponse field is set.
     */
    @Override
    public boolean hasLoginResponse() {
      return packCase_ == 3;
    }
    /**
     * <code>.LoginResponse loginResponse = 3;</code>
     * @return The loginResponse.
     */
    @Override
    public com.netty.client.protocol.MessageBuf.LoginResponse getLoginResponse() {
      if (packCase_ == 3) {
         return (com.netty.client.protocol.MessageBuf.LoginResponse) pack_;
      }
      return com.netty.client.protocol.MessageBuf.LoginResponse.getDefaultInstance();
    }
    /**
     * <code>.LoginResponse loginResponse = 3;</code>
     */
    @Override
    public com.netty.client.protocol.MessageBuf.LoginResponseOrBuilder getLoginResponseOrBuilder() {
      if (packCase_ == 3) {
         return (com.netty.client.protocol.MessageBuf.LoginResponse) pack_;
      }
      return com.netty.client.protocol.MessageBuf.LoginResponse.getDefaultInstance();
    }

    public static final int MESSAGEREQUEST_FIELD_NUMBER = 4;
    /**
     * <code>.MessageRequest messageRequest = 4;</code>
     * @return Whether the messageRequest field is set.
     */
    @Override
    public boolean hasMessageRequest() {
      return packCase_ == 4;
    }
    /**
     * <code>.MessageRequest messageRequest = 4;</code>
     * @return The messageRequest.
     */
    @Override
    public com.netty.client.protocol.MessageBuf.MessageRequest getMessageRequest() {
      if (packCase_ == 4) {
         return (com.netty.client.protocol.MessageBuf.MessageRequest) pack_;
      }
      return com.netty.client.protocol.MessageBuf.MessageRequest.getDefaultInstance();
    }
    /**
     * <code>.MessageRequest messageRequest = 4;</code>
     */
    @Override
    public com.netty.client.protocol.MessageBuf.MessageRequestOrBuilder getMessageRequestOrBuilder() {
      if (packCase_ == 4) {
         return (com.netty.client.protocol.MessageBuf.MessageRequest) pack_;
      }
      return com.netty.client.protocol.MessageBuf.MessageRequest.getDefaultInstance();
    }

    public static final int MESSAGERESPONSE_FIELD_NUMBER = 5;
    /**
     * <code>.MessageResponse messageResponse = 5;</code>
     * @return Whether the messageResponse field is set.
     */
    @Override
    public boolean hasMessageResponse() {
      return packCase_ == 5;
    }
    /**
     * <code>.MessageResponse messageResponse = 5;</code>
     * @return The messageResponse.
     */
    @Override
    public com.netty.client.protocol.MessageBuf.MessageResponse getMessageResponse() {
      if (packCase_ == 5) {
         return (com.netty.client.protocol.MessageBuf.MessageResponse) pack_;
      }
      return com.netty.client.protocol.MessageBuf.MessageResponse.getDefaultInstance();
    }
    /**
     * <code>.MessageResponse messageResponse = 5;</code>
     */
    @Override
    public com.netty.client.protocol.MessageBuf.MessageResponseOrBuilder getMessageResponseOrBuilder() {
      if (packCase_ == 5) {
         return (com.netty.client.protocol.MessageBuf.MessageResponse) pack_;
      }
      return com.netty.client.protocol.MessageBuf.MessageResponse.getDefaultInstance();
    }

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

      memoizedIsInitialized = 1;
      return true;
    }

    @Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (packType_ != com.netty.client.protocol.MessageBuf.Message.PackType.LOGIN_REQ.getNumber()) {
        output.writeEnum(1, packType_);
      }
      if (packCase_ == 2) {
        output.writeMessage(2, (com.netty.client.protocol.MessageBuf.LoginRequest) pack_);
      }
      if (packCase_ == 3) {
        output.writeMessage(3, (com.netty.client.protocol.MessageBuf.LoginResponse) pack_);
      }
      if (packCase_ == 4) {
        output.writeMessage(4, (com.netty.client.protocol.MessageBuf.MessageRequest) pack_);
      }
      if (packCase_ == 5) {
        output.writeMessage(5, (com.netty.client.protocol.MessageBuf.MessageResponse) pack_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (packType_ != com.netty.client.protocol.MessageBuf.Message.PackType.LOGIN_REQ.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(1, packType_);
      }
      if (packCase_ == 2) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, (com.netty.client.protocol.MessageBuf.LoginRequest) pack_);
      }
      if (packCase_ == 3) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, (com.netty.client.protocol.MessageBuf.LoginResponse) pack_);
      }
      if (packCase_ == 4) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, (com.netty.client.protocol.MessageBuf.MessageRequest) pack_);
      }
      if (packCase_ == 5) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, (com.netty.client.protocol.MessageBuf.MessageResponse) pack_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @Override
    public boolean equals(final Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof com.netty.client.protocol.MessageBuf.Message)) {
        return super.equals(obj);
      }
      com.netty.client.protocol.MessageBuf.Message other = (com.netty.client.protocol.MessageBuf.Message) obj;

      if (packType_ != other.packType_) return false;
      if (!getPackCase().equals(other.getPackCase())) return false;
      switch (packCase_) {
        case 2:
          if (!getLoginRequest()
              .equals(other.getLoginRequest())) return false;
          break;
        case 3:
          if (!getLoginResponse()
              .equals(other.getLoginResponse())) return false;
          break;
        case 4:
          if (!getMessageRequest()
              .equals(other.getMessageRequest())) return false;
          break;
        case 5:
          if (!getMessageResponse()
              .equals(other.getMessageResponse())) return false;
          break;
        case 0:
        default:
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + PACKTYPE_FIELD_NUMBER;
      hash = (53 * hash) + packType_;
      switch (packCase_) {
        case 2:
          hash = (37 * hash) + LOGINREQUEST_FIELD_NUMBER;
          hash = (53 * hash) + getLoginRequest().hashCode();
          break;
        case 3:
          hash = (37 * hash) + LOGINRESPONSE_FIELD_NUMBER;
          hash = (53 * hash) + getLoginResponse().hashCode();
          break;
        case 4:
          hash = (37 * hash) + MESSAGEREQUEST_FIELD_NUMBER;
          hash = (53 * hash) + getMessageRequest().hashCode();
          break;
        case 5:
          hash = (37 * hash) + MESSAGERESPONSE_FIELD_NUMBER;
          hash = (53 * hash) + getMessageResponse().hashCode();
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.netty.client.protocol.MessageBuf.Message parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.netty.client.protocol.MessageBuf.Message parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.netty.client.protocol.MessageBuf.Message parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.netty.client.protocol.MessageBuf.Message parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.netty.client.protocol.MessageBuf.Message parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.netty.client.protocol.MessageBuf.Message parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.netty.client.protocol.MessageBuf.Message parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.netty.client.protocol.MessageBuf.Message parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static com.netty.client.protocol.MessageBuf.Message parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.netty.client.protocol.MessageBuf.Message parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static com.netty.client.protocol.MessageBuf.Message parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.netty.client.protocol.MessageBuf.Message parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(com.netty.client.protocol.MessageBuf.Message prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @Override
    protected Builder newBuilderForType(
        BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * 消息整合，便于netty导入解码器
     * </pre>
     *
     * Protobuf type {@code Message}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:Message)
        com.netty.client.protocol.MessageBuf.MessageOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.netty.client.protocol.MessageBuf.internal_static_Message_descriptor;
      }

      @Override
      protected FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.netty.client.protocol.MessageBuf.internal_static_Message_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.netty.client.protocol.MessageBuf.Message.class, com.netty.client.protocol.MessageBuf.Message.Builder.class);
      }

      // Construct using com.netty.client.procotol.MessageBuf.Message.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @Override
      public Builder clear() {
        super.clear();
        packType_ = 0;

        packCase_ = 0;
        pack_ = null;
        return this;
      }

      @Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.netty.client.protocol.MessageBuf.internal_static_Message_descriptor;
      }

      @Override
      public com.netty.client.protocol.MessageBuf.Message getDefaultInstanceForType() {
        return com.netty.client.protocol.MessageBuf.Message.getDefaultInstance();
      }

      @Override
      public com.netty.client.protocol.MessageBuf.Message build() {
        com.netty.client.protocol.MessageBuf.Message result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @Override
      public com.netty.client.protocol.MessageBuf.Message buildPartial() {
        com.netty.client.protocol.MessageBuf.Message result = new com.netty.client.protocol.MessageBuf.Message(this);
        result.packType_ = packType_;
        if (packCase_ == 2) {
          if (loginRequestBuilder_ == null) {
            result.pack_ = pack_;
          } else {
            result.pack_ = loginRequestBuilder_.build();
          }
        }
        if (packCase_ == 3) {
          if (loginResponseBuilder_ == null) {
            result.pack_ = pack_;
          } else {
            result.pack_ = loginResponseBuilder_.build();
          }
        }
        if (packCase_ == 4) {
          if (messageRequestBuilder_ == null) {
            result.pack_ = pack_;
          } else {
            result.pack_ = messageRequestBuilder_.build();
          }
        }
        if (packCase_ == 5) {
          if (messageResponseBuilder_ == null) {
            result.pack_ = pack_;
          } else {
            result.pack_ = messageResponseBuilder_.build();
          }
        }
        result.packCase_ = packCase_;
        onBuilt();
        return result;
      }

      @Override
      public Builder clone() {
        return super.clone();
      }
      @Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return super.setField(field, value);
      }
      @Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }
      @Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }
      @Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return super.setRepeatedField(field, index, value);
      }
      @Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return super.addRepeatedField(field, value);
      }
      @Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.netty.client.protocol.MessageBuf.Message) {
          return mergeFrom((com.netty.client.protocol.MessageBuf.Message)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.netty.client.protocol.MessageBuf.Message other) {
        if (other == com.netty.client.protocol.MessageBuf.Message.getDefaultInstance()) return this;
        if (other.packType_ != 0) {
          setPackTypeValue(other.getPackTypeValue());
        }
        switch (other.getPackCase()) {
          case LOGINREQUEST: {
