All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.whispersystems.textsecure.internal.websocket.WebSocketProtos Maven / Gradle / Ivy

There is a newer version: 1.8.7
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: WebSocketResources.proto

package org.whispersystems.textsecure.internal.websocket;

public final class WebSocketProtos {
  private WebSocketProtos() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public interface WebSocketRequestMessageOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // optional string verb = 1;
    /**
     * optional string verb = 1;
     */
    boolean hasVerb();
    /**
     * optional string verb = 1;
     */
    java.lang.String getVerb();
    /**
     * optional string verb = 1;
     */
    com.google.protobuf.ByteString
        getVerbBytes();

    // optional string path = 2;
    /**
     * optional string path = 2;
     */
    boolean hasPath();
    /**
     * optional string path = 2;
     */
    java.lang.String getPath();
    /**
     * optional string path = 2;
     */
    com.google.protobuf.ByteString
        getPathBytes();

    // optional bytes body = 3;
    /**
     * optional bytes body = 3;
     */
    boolean hasBody();
    /**
     * optional bytes body = 3;
     */
    com.google.protobuf.ByteString getBody();

    // optional uint64 id = 4;
    /**
     * optional uint64 id = 4;
     */
    boolean hasId();
    /**
     * optional uint64 id = 4;
     */
    long getId();
  }
  /**
   * Protobuf type {@code textsecure.WebSocketRequestMessage}
   */
  public static final class WebSocketRequestMessage extends
      com.google.protobuf.GeneratedMessage
      implements WebSocketRequestMessageOrBuilder {
    // Use WebSocketRequestMessage.newBuilder() to construct.
    private WebSocketRequestMessage(com.google.protobuf.GeneratedMessage.Builder builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private WebSocketRequestMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final WebSocketRequestMessage defaultInstance;
    public static WebSocketRequestMessage getDefaultInstance() {
      return defaultInstance;
    }

    public WebSocketRequestMessage getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private WebSocketRequestMessage(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              bitField0_ |= 0x00000001;
              verb_ = input.readBytes();
              break;
            }
            case 18: {
              bitField0_ |= 0x00000002;
              path_ = input.readBytes();
              break;
            }
            case 26: {
              bitField0_ |= 0x00000004;
              body_ = input.readBytes();
              break;
            }
            case 32: {
              bitField0_ |= 0x00000008;
              id_ = input.readUInt64();
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.internal_static_textsecure_WebSocketRequestMessage_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.internal_static_textsecure_WebSocketRequestMessage_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.class, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.Builder.class);
    }

    public static com.google.protobuf.Parser PARSER =
        new com.google.protobuf.AbstractParser() {
      public WebSocketRequestMessage parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new WebSocketRequestMessage(input, extensionRegistry);
      }
    };

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

    private int bitField0_;
    // optional string verb = 1;
    public static final int VERB_FIELD_NUMBER = 1;
    private java.lang.Object verb_;
    /**
     * optional string verb = 1;
     */
    public boolean hasVerb() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * optional string verb = 1;
     */
    public java.lang.String getVerb() {
      java.lang.Object ref = verb_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (bs.isValidUtf8()) {
          verb_ = s;
        }
        return s;
      }
    }
    /**
     * optional string verb = 1;
     */
    public com.google.protobuf.ByteString
        getVerbBytes() {
      java.lang.Object ref = verb_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        verb_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    // optional string path = 2;
    public static final int PATH_FIELD_NUMBER = 2;
    private java.lang.Object path_;
    /**
     * optional string path = 2;
     */
    public boolean hasPath() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * optional string path = 2;
     */
    public java.lang.String getPath() {
      java.lang.Object ref = path_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (bs.isValidUtf8()) {
          path_ = s;
        }
        return s;
      }
    }
    /**
     * optional string path = 2;
     */
    public com.google.protobuf.ByteString
        getPathBytes() {
      java.lang.Object ref = path_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        path_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    // optional bytes body = 3;
    public static final int BODY_FIELD_NUMBER = 3;
    private com.google.protobuf.ByteString body_;
    /**
     * optional bytes body = 3;
     */
    public boolean hasBody() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * optional bytes body = 3;
     */
    public com.google.protobuf.ByteString getBody() {
      return body_;
    }

    // optional uint64 id = 4;
    public static final int ID_FIELD_NUMBER = 4;
    private long id_;
    /**
     * optional uint64 id = 4;
     */
    public boolean hasId() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    /**
     * optional uint64 id = 4;
     */
    public long getId() {
      return id_;
    }

    private void initFields() {
      verb_ = "";
      path_ = "";
      body_ = com.google.protobuf.ByteString.EMPTY;
      id_ = 0L;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBytes(1, getVerbBytes());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeBytes(2, getPathBytes());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeBytes(3, body_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeUInt64(4, id_);
      }
      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, getVerbBytes());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(2, getPathBytes());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(3, body_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt64Size(4, id_);
      }
      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.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage 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;
    }
    /**
     * Protobuf type {@code textsecure.WebSocketRequestMessage}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder
       implements org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessageOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.internal_static_textsecure_WebSocketRequestMessage_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.internal_static_textsecure_WebSocketRequestMessage_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.class, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.Builder.class);
      }

      // Construct using org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.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();
        verb_ = "";
        bitField0_ = (bitField0_ & ~0x00000001);
        path_ = "";
        bitField0_ = (bitField0_ & ~0x00000002);
        body_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000004);
        id_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000008);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.internal_static_textsecure_WebSocketRequestMessage_descriptor;
      }

      public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage getDefaultInstanceForType() {
        return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.getDefaultInstance();
      }

      public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage build() {
        org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage buildPartial() {
        org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage result = new org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.verb_ = verb_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.path_ = path_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.body_ = body_;
        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
          to_bitField0_ |= 0x00000008;
        }
        result.id_ = id_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage) {
          return mergeFrom((org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage other) {
        if (other == org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.getDefaultInstance()) return this;
        if (other.hasVerb()) {
          bitField0_ |= 0x00000001;
          verb_ = other.verb_;
          onChanged();
        }
        if (other.hasPath()) {
          bitField0_ |= 0x00000002;
          path_ = other.path_;
          onChanged();
        }
        if (other.hasBody()) {
          setBody(other.getBody());
        }
        if (other.hasId()) {
          setId(other.getId());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      // optional string verb = 1;
      private java.lang.Object verb_ = "";
      /**
       * optional string verb = 1;
       */
      public boolean hasVerb() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * optional string verb = 1;
       */
      public java.lang.String getVerb() {
        java.lang.Object ref = verb_;
        if (!(ref instanceof java.lang.String)) {
          java.lang.String s = ((com.google.protobuf.ByteString) ref)
              .toStringUtf8();
          verb_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * optional string verb = 1;
       */
      public com.google.protobuf.ByteString
          getVerbBytes() {
        java.lang.Object ref = verb_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          verb_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * optional string verb = 1;
       */
      public Builder setVerb(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        verb_ = value;
        onChanged();
        return this;
      }
      /**
       * optional string verb = 1;
       */
      public Builder clearVerb() {
        bitField0_ = (bitField0_ & ~0x00000001);
        verb_ = getDefaultInstance().getVerb();
        onChanged();
        return this;
      }
      /**
       * optional string verb = 1;
       */
      public Builder setVerbBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        verb_ = value;
        onChanged();
        return this;
      }

      // optional string path = 2;
      private java.lang.Object path_ = "";
      /**
       * optional string path = 2;
       */
      public boolean hasPath() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * optional string path = 2;
       */
      public java.lang.String getPath() {
        java.lang.Object ref = path_;
        if (!(ref instanceof java.lang.String)) {
          java.lang.String s = ((com.google.protobuf.ByteString) ref)
              .toStringUtf8();
          path_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * optional string path = 2;
       */
      public com.google.protobuf.ByteString
          getPathBytes() {
        java.lang.Object ref = path_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          path_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * optional string path = 2;
       */
      public Builder setPath(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000002;
        path_ = value;
        onChanged();
        return this;
      }
      /**
       * optional string path = 2;
       */
      public Builder clearPath() {
        bitField0_ = (bitField0_ & ~0x00000002);
        path_ = getDefaultInstance().getPath();
        onChanged();
        return this;
      }
      /**
       * optional string path = 2;
       */
      public Builder setPathBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000002;
        path_ = value;
        onChanged();
        return this;
      }

      // optional bytes body = 3;
      private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * optional bytes body = 3;
       */
      public boolean hasBody() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      /**
       * optional bytes body = 3;
       */
      public com.google.protobuf.ByteString getBody() {
        return body_;
      }
      /**
       * optional bytes body = 3;
       */
      public Builder setBody(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000004;
        body_ = value;
        onChanged();
        return this;
      }
      /**
       * optional bytes body = 3;
       */
      public Builder clearBody() {
        bitField0_ = (bitField0_ & ~0x00000004);
        body_ = getDefaultInstance().getBody();
        onChanged();
        return this;
      }

      // optional uint64 id = 4;
      private long id_ ;
      /**
       * optional uint64 id = 4;
       */
      public boolean hasId() {
        return ((bitField0_ & 0x00000008) == 0x00000008);
      }
      /**
       * optional uint64 id = 4;
       */
      public long getId() {
        return id_;
      }
      /**
       * optional uint64 id = 4;
       */
      public Builder setId(long value) {
        bitField0_ |= 0x00000008;
        id_ = value;
        onChanged();
        return this;
      }
      /**
       * optional uint64 id = 4;
       */
      public Builder clearId() {
        bitField0_ = (bitField0_ & ~0x00000008);
        id_ = 0L;
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:textsecure.WebSocketRequestMessage)
    }

    static {
      defaultInstance = new WebSocketRequestMessage(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:textsecure.WebSocketRequestMessage)
  }

  public interface WebSocketResponseMessageOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // optional uint64 id = 1;
    /**
     * optional uint64 id = 1;
     */
    boolean hasId();
    /**
     * optional uint64 id = 1;
     */
    long getId();

    // optional uint32 status = 2;
    /**
     * optional uint32 status = 2;
     */
    boolean hasStatus();
    /**
     * optional uint32 status = 2;
     */
    int getStatus();

    // optional string message = 3;
    /**
     * optional string message = 3;
     */
    boolean hasMessage();
    /**
     * optional string message = 3;
     */
    java.lang.String getMessage();
    /**
     * optional string message = 3;
     */
    com.google.protobuf.ByteString
        getMessageBytes();

    // optional bytes body = 4;
    /**
     * optional bytes body = 4;
     */
    boolean hasBody();
    /**
     * optional bytes body = 4;
     */
    com.google.protobuf.ByteString getBody();
  }
  /**
   * Protobuf type {@code textsecure.WebSocketResponseMessage}
   */
  public static final class WebSocketResponseMessage extends
      com.google.protobuf.GeneratedMessage
      implements WebSocketResponseMessageOrBuilder {
    // Use WebSocketResponseMessage.newBuilder() to construct.
    private WebSocketResponseMessage(com.google.protobuf.GeneratedMessage.Builder builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private WebSocketResponseMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final WebSocketResponseMessage defaultInstance;
    public static WebSocketResponseMessage getDefaultInstance() {
      return defaultInstance;
    }

    public WebSocketResponseMessage getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private WebSocketResponseMessage(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 8: {
              bitField0_ |= 0x00000001;
              id_ = input.readUInt64();
              break;
            }
            case 16: {
              bitField0_ |= 0x00000002;
              status_ = input.readUInt32();
              break;
            }
            case 26: {
              bitField0_ |= 0x00000004;
              message_ = input.readBytes();
              break;
            }
            case 34: {
              bitField0_ |= 0x00000008;
              body_ = input.readBytes();
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.internal_static_textsecure_WebSocketResponseMessage_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.internal_static_textsecure_WebSocketResponseMessage_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.class, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.Builder.class);
    }

    public static com.google.protobuf.Parser PARSER =
        new com.google.protobuf.AbstractParser() {
      public WebSocketResponseMessage parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new WebSocketResponseMessage(input, extensionRegistry);
      }
    };

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

    private int bitField0_;
    // optional uint64 id = 1;
    public static final int ID_FIELD_NUMBER = 1;
    private long id_;
    /**
     * optional uint64 id = 1;
     */
    public boolean hasId() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * optional uint64 id = 1;
     */
    public long getId() {
      return id_;
    }

    // optional uint32 status = 2;
    public static final int STATUS_FIELD_NUMBER = 2;
    private int status_;
    /**
     * optional uint32 status = 2;
     */
    public boolean hasStatus() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * optional uint32 status = 2;
     */
    public int getStatus() {
      return status_;
    }

    // optional string message = 3;
    public static final int MESSAGE_FIELD_NUMBER = 3;
    private java.lang.Object message_;
    /**
     * optional string message = 3;
     */
    public boolean hasMessage() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * optional string message = 3;
     */
    public java.lang.String getMessage() {
      java.lang.Object ref = message_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (bs.isValidUtf8()) {
          message_ = s;
        }
        return s;
      }
    }
    /**
     * optional string message = 3;
     */
    public com.google.protobuf.ByteString
        getMessageBytes() {
      java.lang.Object ref = message_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        message_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    // optional bytes body = 4;
    public static final int BODY_FIELD_NUMBER = 4;
    private com.google.protobuf.ByteString body_;
    /**
     * optional bytes body = 4;
     */
    public boolean hasBody() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    /**
     * optional bytes body = 4;
     */
    public com.google.protobuf.ByteString getBody() {
      return body_;
    }

    private void initFields() {
      id_ = 0L;
      status_ = 0;
      message_ = "";
      body_ = com.google.protobuf.ByteString.EMPTY;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeUInt64(1, id_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeUInt32(2, status_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeBytes(3, getMessageBytes());
      }
      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
          .computeUInt64Size(1, id_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32Size(2, status_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(3, getMessageBytes());
      }
      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.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage 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;
    }
    /**
     * Protobuf type {@code textsecure.WebSocketResponseMessage}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder
       implements org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessageOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.internal_static_textsecure_WebSocketResponseMessage_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.internal_static_textsecure_WebSocketResponseMessage_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.class, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.Builder.class);
      }

      // Construct using org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.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();
        id_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000001);
        status_ = 0;
        bitField0_ = (bitField0_ & ~0x00000002);
        message_ = "";
        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.whispersystems.textsecure.internal.websocket.WebSocketProtos.internal_static_textsecure_WebSocketResponseMessage_descriptor;
      }

      public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage getDefaultInstanceForType() {
        return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.getDefaultInstance();
      }

      public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage build() {
        org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage buildPartial() {
        org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage result = new org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.id_ = id_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.status_ = status_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.message_ = message_;
        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.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage) {
          return mergeFrom((org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage other) {
        if (other == org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.getDefaultInstance()) return this;
        if (other.hasId()) {
          setId(other.getId());
        }
        if (other.hasStatus()) {
          setStatus(other.getStatus());
        }
        if (other.hasMessage()) {
          bitField0_ |= 0x00000004;
          message_ = other.message_;
          onChanged();
        }
        if (other.hasBody()) {
          setBody(other.getBody());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      // optional uint64 id = 1;
      private long id_ ;
      /**
       * optional uint64 id = 1;
       */
      public boolean hasId() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * optional uint64 id = 1;
       */
      public long getId() {
        return id_;
      }
      /**
       * optional uint64 id = 1;
       */
      public Builder setId(long value) {
        bitField0_ |= 0x00000001;
        id_ = value;
        onChanged();
        return this;
      }
      /**
       * optional uint64 id = 1;
       */
      public Builder clearId() {
        bitField0_ = (bitField0_ & ~0x00000001);
        id_ = 0L;
        onChanged();
        return this;
      }

      // optional uint32 status = 2;
      private int status_ ;
      /**
       * optional uint32 status = 2;
       */
      public boolean hasStatus() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * optional uint32 status = 2;
       */
      public int getStatus() {
        return status_;
      }
      /**
       * optional uint32 status = 2;
       */
      public Builder setStatus(int value) {
        bitField0_ |= 0x00000002;
        status_ = value;
        onChanged();
        return this;
      }
      /**
       * optional uint32 status = 2;
       */
      public Builder clearStatus() {
        bitField0_ = (bitField0_ & ~0x00000002);
        status_ = 0;
        onChanged();
        return this;
      }

      // optional string message = 3;
      private java.lang.Object message_ = "";
      /**
       * optional string message = 3;
       */
      public boolean hasMessage() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      /**
       * optional string message = 3;
       */
      public java.lang.String getMessage() {
        java.lang.Object ref = message_;
        if (!(ref instanceof java.lang.String)) {
          java.lang.String s = ((com.google.protobuf.ByteString) ref)
              .toStringUtf8();
          message_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * optional string message = 3;
       */
      public com.google.protobuf.ByteString
          getMessageBytes() {
        java.lang.Object ref = message_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          message_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * optional string message = 3;
       */
      public Builder setMessage(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000004;
        message_ = value;
        onChanged();
        return this;
      }
      /**
       * optional string message = 3;
       */
      public Builder clearMessage() {
        bitField0_ = (bitField0_ & ~0x00000004);
        message_ = getDefaultInstance().getMessage();
        onChanged();
        return this;
      }
      /**
       * optional string message = 3;
       */
      public Builder setMessageBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000004;
        message_ = value;
        onChanged();
        return this;
      }

      // optional bytes body = 4;
      private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * optional bytes body = 4;
       */
      public boolean hasBody() {
        return ((bitField0_ & 0x00000008) == 0x00000008);
      }
      /**
       * optional bytes body = 4;
       */
      public com.google.protobuf.ByteString getBody() {
        return body_;
      }
      /**
       * optional bytes body = 4;
       */
      public Builder setBody(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000008;
        body_ = value;
        onChanged();
        return this;
      }
      /**
       * optional bytes body = 4;
       */
      public Builder clearBody() {
        bitField0_ = (bitField0_ & ~0x00000008);
        body_ = getDefaultInstance().getBody();
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:textsecure.WebSocketResponseMessage)
    }

    static {
      defaultInstance = new WebSocketResponseMessage(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:textsecure.WebSocketResponseMessage)
  }

  public interface WebSocketMessageOrBuilder
      extends com.google.protobuf.MessageOrBuilder {

    // optional .textsecure.WebSocketMessage.Type type = 1;
    /**
     * optional .textsecure.WebSocketMessage.Type type = 1;
     */
    boolean hasType();
    /**
     * optional .textsecure.WebSocketMessage.Type type = 1;
     */
    org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.Type getType();

    // optional .textsecure.WebSocketRequestMessage request = 2;
    /**
     * optional .textsecure.WebSocketRequestMessage request = 2;
     */
    boolean hasRequest();
    /**
     * optional .textsecure.WebSocketRequestMessage request = 2;
     */
    org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage getRequest();
    /**
     * optional .textsecure.WebSocketRequestMessage request = 2;
     */
    org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessageOrBuilder getRequestOrBuilder();

    // optional .textsecure.WebSocketResponseMessage response = 3;
    /**
     * optional .textsecure.WebSocketResponseMessage response = 3;
     */
    boolean hasResponse();
    /**
     * optional .textsecure.WebSocketResponseMessage response = 3;
     */
    org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage getResponse();
    /**
     * optional .textsecure.WebSocketResponseMessage response = 3;
     */
    org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessageOrBuilder getResponseOrBuilder();
  }
  /**
   * Protobuf type {@code textsecure.WebSocketMessage}
   */
  public static final class WebSocketMessage extends
      com.google.protobuf.GeneratedMessage
      implements WebSocketMessageOrBuilder {
    // Use WebSocketMessage.newBuilder() to construct.
    private WebSocketMessage(com.google.protobuf.GeneratedMessage.Builder builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private WebSocketMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final WebSocketMessage defaultInstance;
    public static WebSocketMessage getDefaultInstance() {
      return defaultInstance;
    }

    public WebSocketMessage getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private WebSocketMessage(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 8: {
              int rawValue = input.readEnum();
              org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.Type value = org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.Type.valueOf(rawValue);
              if (value == null) {
                unknownFields.mergeVarintField(1, rawValue);
              } else {
                bitField0_ |= 0x00000001;
                type_ = value;
              }
              break;
            }
            case 18: {
              org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.Builder subBuilder = null;
              if (((bitField0_ & 0x00000002) == 0x00000002)) {
                subBuilder = request_.toBuilder();
              }
              request_ = input.readMessage(org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(request_);
                request_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000002;
              break;
            }
            case 26: {
              org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.Builder subBuilder = null;
              if (((bitField0_ & 0x00000004) == 0x00000004)) {
                subBuilder = response_.toBuilder();
              }
              response_ = input.readMessage(org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(response_);
                response_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000004;
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.internal_static_textsecure_WebSocketMessage_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.internal_static_textsecure_WebSocketMessage_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.class, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.Builder.class);
    }

    public static com.google.protobuf.Parser PARSER =
        new com.google.protobuf.AbstractParser() {
      public WebSocketMessage parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new WebSocketMessage(input, extensionRegistry);
      }
    };

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

    /**
     * Protobuf enum {@code textsecure.WebSocketMessage.Type}
     */
    public enum Type
        implements com.google.protobuf.ProtocolMessageEnum {
      /**
       * UNKNOWN = 0;
       */
      UNKNOWN(0, 0),
      /**
       * REQUEST = 1;
       */
      REQUEST(1, 1),
      /**
       * RESPONSE = 2;
       */
      RESPONSE(2, 2),
      ;

      /**
       * UNKNOWN = 0;
       */
      public static final int UNKNOWN_VALUE = 0;
      /**
       * REQUEST = 1;
       */
      public static final int REQUEST_VALUE = 1;
      /**
       * RESPONSE = 2;
       */
      public static final int RESPONSE_VALUE = 2;


      public final int getNumber() { return value; }

      public static Type valueOf(int value) {
        switch (value) {
          case 0: return UNKNOWN;
          case 1: return REQUEST;
          case 2: return RESPONSE;
          default: return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap
          internalGetValueMap() {
        return internalValueMap;
      }
      private static com.google.protobuf.Internal.EnumLiteMap
          internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap() {
              public Type findValueByNumber(int number) {
                return Type.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.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.getDescriptor().getEnumTypes().get(0);
      }

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

      public static Type 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 Type(int index, int value) {
        this.index = index;
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:textsecure.WebSocketMessage.Type)
    }

    private int bitField0_;
    // optional .textsecure.WebSocketMessage.Type type = 1;
    public static final int TYPE_FIELD_NUMBER = 1;
    private org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.Type type_;
    /**
     * optional .textsecure.WebSocketMessage.Type type = 1;
     */
    public boolean hasType() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * optional .textsecure.WebSocketMessage.Type type = 1;
     */
    public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.Type getType() {
      return type_;
    }

    // optional .textsecure.WebSocketRequestMessage request = 2;
    public static final int REQUEST_FIELD_NUMBER = 2;
    private org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage request_;
    /**
     * optional .textsecure.WebSocketRequestMessage request = 2;
     */
    public boolean hasRequest() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * optional .textsecure.WebSocketRequestMessage request = 2;
     */
    public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage getRequest() {
      return request_;
    }
    /**
     * optional .textsecure.WebSocketRequestMessage request = 2;
     */
    public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessageOrBuilder getRequestOrBuilder() {
      return request_;
    }

    // optional .textsecure.WebSocketResponseMessage response = 3;
    public static final int RESPONSE_FIELD_NUMBER = 3;
    private org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage response_;
    /**
     * optional .textsecure.WebSocketResponseMessage response = 3;
     */
    public boolean hasResponse() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * optional .textsecure.WebSocketResponseMessage response = 3;
     */
    public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage getResponse() {
      return response_;
    }
    /**
     * optional .textsecure.WebSocketResponseMessage response = 3;
     */
    public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessageOrBuilder getResponseOrBuilder() {
      return response_;
    }

    private void initFields() {
      type_ = org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.Type.UNKNOWN;
      request_ = org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.getDefaultInstance();
      response_ = org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.getDefaultInstance();
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeEnum(1, type_.getNumber());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeMessage(2, request_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeMessage(3, response_);
      }
      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, type_.getNumber());
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, request_);
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, response_);
      }
      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.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage 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;
    }
    /**
     * Protobuf type {@code textsecure.WebSocketMessage}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder
       implements org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessageOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.internal_static_textsecure_WebSocketMessage_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.internal_static_textsecure_WebSocketMessage_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.class, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.Builder.class);
      }

      // Construct using org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getRequestFieldBuilder();
          getResponseFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        type_ = org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.Type.UNKNOWN;
        bitField0_ = (bitField0_ & ~0x00000001);
        if (requestBuilder_ == null) {
          request_ = org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.getDefaultInstance();
        } else {
          requestBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        if (responseBuilder_ == null) {
          response_ = org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.getDefaultInstance();
        } else {
          responseBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.internal_static_textsecure_WebSocketMessage_descriptor;
      }

      public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage getDefaultInstanceForType() {
        return org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.getDefaultInstance();
      }

      public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage build() {
        org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage buildPartial() {
        org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage result = new org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.type_ = type_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        if (requestBuilder_ == null) {
          result.request_ = request_;
        } else {
          result.request_ = requestBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        if (responseBuilder_ == null) {
          result.response_ = response_;
        } else {
          result.response_ = responseBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage) {
          return mergeFrom((org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage other) {
        if (other == org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.getDefaultInstance()) return this;
        if (other.hasType()) {
          setType(other.getType());
        }
        if (other.hasRequest()) {
          mergeRequest(other.getRequest());
        }
        if (other.hasResponse()) {
          mergeResponse(other.getResponse());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      // optional .textsecure.WebSocketMessage.Type type = 1;
      private org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.Type type_ = org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.Type.UNKNOWN;
      /**
       * optional .textsecure.WebSocketMessage.Type type = 1;
       */
      public boolean hasType() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * optional .textsecure.WebSocketMessage.Type type = 1;
       */
      public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.Type getType() {
        return type_;
      }
      /**
       * optional .textsecure.WebSocketMessage.Type type = 1;
       */
      public Builder setType(org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.Type value) {
        if (value == null) {
          throw new NullPointerException();
        }
        bitField0_ |= 0x00000001;
        type_ = value;
        onChanged();
        return this;
      }
      /**
       * optional .textsecure.WebSocketMessage.Type type = 1;
       */
      public Builder clearType() {
        bitField0_ = (bitField0_ & ~0x00000001);
        type_ = org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketMessage.Type.UNKNOWN;
        onChanged();
        return this;
      }

      // optional .textsecure.WebSocketRequestMessage request = 2;
      private org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage request_ = org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.Builder, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessageOrBuilder> requestBuilder_;
      /**
       * optional .textsecure.WebSocketRequestMessage request = 2;
       */
      public boolean hasRequest() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * optional .textsecure.WebSocketRequestMessage request = 2;
       */
      public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage getRequest() {
        if (requestBuilder_ == null) {
          return request_;
        } else {
          return requestBuilder_.getMessage();
        }
      }
      /**
       * optional .textsecure.WebSocketRequestMessage request = 2;
       */
      public Builder setRequest(org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage value) {
        if (requestBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          request_ = value;
          onChanged();
        } else {
          requestBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * optional .textsecure.WebSocketRequestMessage request = 2;
       */
      public Builder setRequest(
          org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.Builder builderForValue) {
        if (requestBuilder_ == null) {
          request_ = builderForValue.build();
          onChanged();
        } else {
          requestBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * optional .textsecure.WebSocketRequestMessage request = 2;
       */
      public Builder mergeRequest(org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage value) {
        if (requestBuilder_ == null) {
          if (((bitField0_ & 0x00000002) == 0x00000002) &&
              request_ != org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.getDefaultInstance()) {
            request_ =
              org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.newBuilder(request_).mergeFrom(value).buildPartial();
          } else {
            request_ = value;
          }
          onChanged();
        } else {
          requestBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * optional .textsecure.WebSocketRequestMessage request = 2;
       */
      public Builder clearRequest() {
        if (requestBuilder_ == null) {
          request_ = org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.getDefaultInstance();
          onChanged();
        } else {
          requestBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }
      /**
       * optional .textsecure.WebSocketRequestMessage request = 2;
       */
      public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.Builder getRequestBuilder() {
        bitField0_ |= 0x00000002;
        onChanged();
        return getRequestFieldBuilder().getBuilder();
      }
      /**
       * optional .textsecure.WebSocketRequestMessage request = 2;
       */
      public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessageOrBuilder getRequestOrBuilder() {
        if (requestBuilder_ != null) {
          return requestBuilder_.getMessageOrBuilder();
        } else {
          return request_;
        }
      }
      /**
       * optional .textsecure.WebSocketRequestMessage request = 2;
       */
      private com.google.protobuf.SingleFieldBuilder<
          org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.Builder, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessageOrBuilder> 
          getRequestFieldBuilder() {
        if (requestBuilder_ == null) {
          requestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessage.Builder, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketRequestMessageOrBuilder>(
                  request_,
                  getParentForChildren(),
                  isClean());
          request_ = null;
        }
        return requestBuilder_;
      }

      // optional .textsecure.WebSocketResponseMessage response = 3;
      private org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage response_ = org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.Builder, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessageOrBuilder> responseBuilder_;
      /**
       * optional .textsecure.WebSocketResponseMessage response = 3;
       */
      public boolean hasResponse() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      /**
       * optional .textsecure.WebSocketResponseMessage response = 3;
       */
      public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage getResponse() {
        if (responseBuilder_ == null) {
          return response_;
        } else {
          return responseBuilder_.getMessage();
        }
      }
      /**
       * optional .textsecure.WebSocketResponseMessage response = 3;
       */
      public Builder setResponse(org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage value) {
        if (responseBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          response_ = value;
          onChanged();
        } else {
          responseBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      /**
       * optional .textsecure.WebSocketResponseMessage response = 3;
       */
      public Builder setResponse(
          org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.Builder builderForValue) {
        if (responseBuilder_ == null) {
          response_ = builderForValue.build();
          onChanged();
        } else {
          responseBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      /**
       * optional .textsecure.WebSocketResponseMessage response = 3;
       */
      public Builder mergeResponse(org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage value) {
        if (responseBuilder_ == null) {
          if (((bitField0_ & 0x00000004) == 0x00000004) &&
              response_ != org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.getDefaultInstance()) {
            response_ =
              org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.newBuilder(response_).mergeFrom(value).buildPartial();
          } else {
            response_ = value;
          }
          onChanged();
        } else {
          responseBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      /**
       * optional .textsecure.WebSocketResponseMessage response = 3;
       */
      public Builder clearResponse() {
        if (responseBuilder_ == null) {
          response_ = org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.getDefaultInstance();
          onChanged();
        } else {
          responseBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }
      /**
       * optional .textsecure.WebSocketResponseMessage response = 3;
       */
      public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.Builder getResponseBuilder() {
        bitField0_ |= 0x00000004;
        onChanged();
        return getResponseFieldBuilder().getBuilder();
      }
      /**
       * optional .textsecure.WebSocketResponseMessage response = 3;
       */
      public org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessageOrBuilder getResponseOrBuilder() {
        if (responseBuilder_ != null) {
          return responseBuilder_.getMessageOrBuilder();
        } else {
          return response_;
        }
      }
      /**
       * optional .textsecure.WebSocketResponseMessage response = 3;
       */
      private com.google.protobuf.SingleFieldBuilder<
          org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.Builder, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessageOrBuilder> 
          getResponseFieldBuilder() {
        if (responseBuilder_ == null) {
          responseBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessage.Builder, org.whispersystems.textsecure.internal.websocket.WebSocketProtos.WebSocketResponseMessageOrBuilder>(
                  response_,
                  getParentForChildren(),
                  isClean());
          response_ = null;
        }
        return responseBuilder_;
      }

      // @@protoc_insertion_point(builder_scope:textsecure.WebSocketMessage)
    }

    static {
      defaultInstance = new WebSocketMessage(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:textsecure.WebSocketMessage)
  }

  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_textsecure_WebSocketRequestMessage_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_textsecure_WebSocketRequestMessage_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_textsecure_WebSocketResponseMessage_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_textsecure_WebSocketResponseMessage_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_textsecure_WebSocketMessage_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_textsecure_WebSocketMessage_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\030WebSocketResources.proto\022\ntextsecure\"O" +
      "\n\027WebSocketRequestMessage\022\014\n\004verb\030\001 \001(\t\022" +
      "\014\n\004path\030\002 \001(\t\022\014\n\004body\030\003 \001(\014\022\n\n\002id\030\004 \001(\004\"" +
      "U\n\030WebSocketResponseMessage\022\n\n\002id\030\001 \001(\004\022" +
      "\016\n\006status\030\002 \001(\r\022\017\n\007message\030\003 \001(\t\022\014\n\004body" +
      "\030\004 \001(\014\"\341\001\n\020WebSocketMessage\022/\n\004type\030\001 \001(" +
      "\0162!.textsecure.WebSocketMessage.Type\0224\n\007" +
      "request\030\002 \001(\0132#.textsecure.WebSocketRequ" +
      "estMessage\0226\n\010response\030\003 \001(\0132$.textsecur" +
      "e.WebSocketResponseMessage\".\n\004Type\022\013\n\007UN",
      "KNOWN\020\000\022\013\n\007REQUEST\020\001\022\014\n\010RESPONSE\020\002BC\n0or" +
      "g.whispersystems.textsecure.internal.web" +
      "socketB\017WebSocketProtos"
    };
    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_textsecure_WebSocketRequestMessage_descriptor =
            getDescriptor().getMessageTypes().get(0);
          internal_static_textsecure_WebSocketRequestMessage_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_textsecure_WebSocketRequestMessage_descriptor,
              new java.lang.String[] { "Verb", "Path", "Body", "Id", });
          internal_static_textsecure_WebSocketResponseMessage_descriptor =
            getDescriptor().getMessageTypes().get(1);
          internal_static_textsecure_WebSocketResponseMessage_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_textsecure_WebSocketResponseMessage_descriptor,
              new java.lang.String[] { "Id", "Status", "Message", "Body", });
          internal_static_textsecure_WebSocketMessage_descriptor =
            getDescriptor().getMessageTypes().get(2);
          internal_static_textsecure_WebSocketMessage_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_textsecure_WebSocketMessage_descriptor,
              new java.lang.String[] { "Type", "Request", "Response", });
          return null;
        }
      };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        }, assigner);
  }

  // @@protoc_insertion_point(outer_class_scope)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy