content: // Generated by the protocol buffer compiler.  DO NOT EDIT!
  // source: WhisperTextProtocol.proto
  
  package org.whispersystems.libsignal.protocol;
  
  public final class SignalProtos {
    private SignalProtos() {}
    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 SignalMessageOrBuilder extends
        // @@protoc_insertion_point(interface_extends:textsecure.SignalMessage)
        com.google.protobuf.MessageOrBuilder {
  
      /**
       * <code>optional bytes ratchetKey = 1;</code>
       * @return Whether the ratchetKey field is set.
       */
      boolean hasRatchetKey();
      /**
       * <code>optional bytes ratchetKey = 1;</code>
       * @return The ratchetKey.
       */
      com.google.protobuf.ByteString getRatchetKey();
  
      /**
       * <code>optional uint32 counter = 2;</code>
       * @return Whether the counter field is set.
       */
      boolean hasCounter();
      /**
       * <code>optional uint32 counter = 2;</code>
       * @return The counter.
       */
      int getCounter();
  
      /**
       * <code>optional uint32 previousCounter = 3;</code>
       * @return Whether the previousCounter field is set.
       */
      boolean hasPreviousCounter();
      /**
       * <code>optional uint32 previousCounter = 3;</code>
       * @return The previousCounter.
       */
      int getPreviousCounter();
  
      /**
       * <code>optional bytes ciphertext = 4;</code>
       * @return Whether the ciphertext field is set.
       */
      boolean hasCiphertext();
      /**
       * <code>optional bytes ciphertext = 4;</code>
       * @return The ciphertext.
       */
      com.google.protobuf.ByteString getCiphertext();
    }
    /**
     * Protobuf type {@code textsecure.SignalMessage}
     */
    public static final class SignalMessage extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:textsecure.SignalMessage)
        SignalMessageOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use SignalMessage.newBuilder() to construct.
      private SignalMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private SignalMessage() {
        ratchetKey_ = com.google.protobuf.ByteString.EMPTY;
        ciphertext_ = com.google.protobuf.ByteString.EMPTY;
      }
  
      @java.lang.Override
      @SuppressWarnings({"unused"})
      protected java.lang.Object newInstance(
          UnusedPrivateParameter unused) {
        return new SignalMessage();
      }
  
      @java.lang.Override
      public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
        return this.unknownFields;
      }
      private SignalMessage(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        this();
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
            com.google.protobuf.UnknownFieldSet.newBuilder();
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 10: {
                bitField0_ |= 0x00000001;
                ratchetKey_ = input.readBytes();
                break;
              }
              case 16: {
                bitField0_ |= 0x00000002;
                counter_ = input.readUInt32();
                break;
              }
              case 24: {
                bitField0_ |= 0x00000004;
                previousCounter_ = input.readUInt32();
                break;
              }
              case 34: {
                bitField0_ |= 0x00000008;
                ciphertext_ = input.readBytes();
                break;
              }
              default: {
                if (!parseUnknownField(
                    input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
            }
          }
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(
              e).setUnfinishedMessage(this);
        } finally {
          this.unknownFields = unknownFields.build();
          makeExtensionsImmutable();
        }
      }
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_SignalMessage_descriptor;
      }
  
      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_SignalMessage_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage.class, org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage.Builder.class);
      }
  
      private int bitField0_;
      public static final int RATCHETKEY_FIELD_NUMBER = 1;
      private com.google.protobuf.ByteString ratchetKey_;
      /**
       * <code>optional bytes ratchetKey = 1;</code>
       * @return Whether the ratchetKey field is set.
       */
      @java.lang.Override
      public boolean hasRatchetKey() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <code>optional bytes ratchetKey = 1;</code>
       * @return The ratchetKey.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getRatchetKey() {
        return ratchetKey_;
      }
  
      public static final int COUNTER_FIELD_NUMBER = 2;
      private int counter_;
      /**
       * <code>optional uint32 counter = 2;</code>
       * @return Whether the counter field is set.
       */
      @java.lang.Override
      public boolean hasCounter() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <code>optional uint32 counter = 2;</code>
       * @return The counter.
       */
      @java.lang.Override
      public int getCounter() {
        return counter_;
      }
  
      public static final int PREVIOUSCOUNTER_FIELD_NUMBER = 3;
      private int previousCounter_;
      /**
       * <code>optional uint32 previousCounter = 3;</code>
       * @return Whether the previousCounter field is set.
       */
      @java.lang.Override
      public boolean hasPreviousCounter() {
        return ((bitField0_ & 0x00000004) != 0);
      }
      /**
       * <code>optional uint32 previousCounter = 3;</code>
       * @return The previousCounter.
       */
      @java.lang.Override
      public int getPreviousCounter() {
        return previousCounter_;
      }
  
      public static final int CIPHERTEXT_FIELD_NUMBER = 4;
      private com.google.protobuf.ByteString ciphertext_;
      /**
       * <code>optional bytes ciphertext = 4;</code>
       * @return Whether the ciphertext field is set.
       */
      @java.lang.Override
      public boolean hasCiphertext() {
        return ((bitField0_ & 0x00000008) != 0);
      }
      /**
       * <code>optional bytes ciphertext = 4;</code>
       * @return The ciphertext.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getCiphertext() {
        return ciphertext_;
      }
  
      private byte memoizedIsInitialized = -1;
      @java.lang.Override
      public final boolean isInitialized() {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized == 1) return true;
        if (isInitialized == 0) return false;
  
        memoizedIsInitialized = 1;
        return true;
      }
  
      @java.lang.Override
      public void writeTo(com.google.protobuf.CodedOutputStream output)
                          throws java.io.IOException {
        if (((bitField0_ & 0x00000001) != 0)) {
          output.writeBytes(1, ratchetKey_);
        }
        if (((bitField0_ & 0x00000002) != 0)) {
          output.writeUInt32(2, counter_);
        }
        if (((bitField0_ & 0x00000004) != 0)) {
          output.writeUInt32(3, previousCounter_);
        }
        if (((bitField0_ & 0x00000008) != 0)) {
          output.writeBytes(4, ciphertext_);
        }
        unknownFields.writeTo(output);
      }
  
      @java.lang.Override
      public int getSerializedSize() {
        int size = memoizedSize;
        if (size != -1) return size;
  
        size = 0;
        if (((bitField0_ & 0x00000001) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeBytesSize(1, ratchetKey_);
        }
        if (((bitField0_ & 0x00000002) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeUInt32Size(2, counter_);
        }
        if (((bitField0_ & 0x00000004) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeUInt32Size(3, previousCounter_);
        }
        if (((bitField0_ & 0x00000008) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeBytesSize(4, ciphertext_);
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
      }
  
      @java.lang.Override
      public boolean equals(final java.lang.Object obj) {
        if (obj == this) {
         return true;
        }
        if (!(obj instanceof org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage)) {
          return super.equals(obj);
        }
        org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage other = (org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage) obj;
  
        if (hasRatchetKey() != other.hasRatchetKey()) return false;
        if (hasRatchetKey()) {
          if (!getRatchetKey()
              .equals(other.getRatchetKey())) return false;
        }
        if (hasCounter() != other.hasCounter()) return false;
        if (hasCounter()) {
          if (getCounter()
              != other.getCounter()) return false;
        }
        if (hasPreviousCounter() != other.hasPreviousCounter()) return false;
        if (hasPreviousCounter()) {
          if (getPreviousCounter()
              != other.getPreviousCounter()) return false;
        }
        if (hasCiphertext() != other.hasCiphertext()) return false;
        if (hasCiphertext()) {
          if (!getCiphertext()
              .equals(other.getCiphertext())) return false;
        }
        if (!unknownFields.equals(other.unknownFields)) return false;
        return true;
      }
  
      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        if (hasRatchetKey()) {
          hash = (37 * hash) + RATCHETKEY_FIELD_NUMBER;
          hash = (53 * hash) + getRatchetKey().hashCode();
        }
        if (hasCounter()) {
          hash = (37 * hash) + COUNTER_FIELD_NUMBER;
          hash = (53 * hash) + getCounter();
        }
        if (hasPreviousCounter()) {
          hash = (37 * hash) + PREVIOUSCOUNTER_FIELD_NUMBER;
          hash = (53 * hash) + getPreviousCounter();
        }
        if (hasCiphertext()) {
          hash = (37 * hash) + CIPHERTEXT_FIELD_NUMBER;
          hash = (53 * hash) + getCiphertext().hashCode();
        }
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }
  
      public static org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage 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.libsignal.protocol.SignalProtos.SignalMessage parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
  
      @java.lang.Override
      public Builder newBuilderForType() { return newBuilder(); }
      public static Builder newBuilder() {
        return DEFAULT_INSTANCE.toBuilder();
      }
      public static Builder newBuilder(org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
      }
      @java.lang.Override
      public Builder toBuilder() {
        return this == DEFAULT_INSTANCE
            ? new Builder() : new Builder().mergeFrom(this);
      }
  
      @java.lang.Override
      protected Builder newBuilderForType(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        Builder builder = new Builder(parent);
        return builder;
      }
      /**
       * Protobuf type {@code textsecure.SignalMessage}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:textsecure.SignalMessage)
          org.whispersystems.libsignal.protocol.SignalProtos.SignalMessageOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_SignalMessage_descriptor;
        }
  
        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_SignalMessage_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage.class, org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage.Builder.class);
        }
  
        // Construct using org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage.newBuilder()
        private Builder() {
          maybeForceBuilderInitialization();
        }
  
        private Builder(
            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
          super(parent);
          maybeForceBuilderInitialization();
        }
        private void maybeForceBuilderInitialization() {
          if (com.google.protobuf.GeneratedMessageV3
                  .alwaysUseFieldBuilders) {
          }
        }
        @java.lang.Override
        public Builder clear() {
          super.clear();
          ratchetKey_ = com.google.protobuf.ByteString.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000001);
          counter_ = 0;
          bitField0_ = (bitField0_ & ~0x00000002);
          previousCounter_ = 0;
          bitField0_ = (bitField0_ & ~0x00000004);
          ciphertext_ = com.google.protobuf.ByteString.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000008);
          return this;
        }
  
        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor
            getDescriptorForType() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_SignalMessage_descriptor;
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage getDefaultInstanceForType() {
          return org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage.getDefaultInstance();
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage build() {
          org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage buildPartial() {
          org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage result = new org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage(this);
          int from_bitField0_ = bitField0_;
          int to_bitField0_ = 0;
          if (((from_bitField0_ & 0x00000001) != 0)) {
            to_bitField0_ |= 0x00000001;
          }
          result.ratchetKey_ = ratchetKey_;
          if (((from_bitField0_ & 0x00000002) != 0)) {
            result.counter_ = counter_;
            to_bitField0_ |= 0x00000002;
          }
          if (((from_bitField0_ & 0x00000004) != 0)) {
            result.previousCounter_ = previousCounter_;
            to_bitField0_ |= 0x00000004;
          }
          if (((from_bitField0_ & 0x00000008) != 0)) {
            to_bitField0_ |= 0x00000008;
          }
          result.ciphertext_ = ciphertext_;
          result.bitField0_ = to_bitField0_;
          onBuilt();
          return result;
        }
  
        @java.lang.Override
        public Builder clone() {
          return super.clone();
        }
        @java.lang.Override
        public Builder setField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return super.setField(field, value);
        }
        @java.lang.Override
        public Builder clearField(
            com.google.protobuf.Descriptors.FieldDescriptor field) {
          return super.clearField(field);
        }
        @java.lang.Override
        public Builder clearOneof(
            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
          return super.clearOneof(oneof);
        }
        @java.lang.Override
        public Builder setRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            int index, java.lang.Object value) {
          return super.setRepeatedField(field, index, value);
        }
        @java.lang.Override
        public Builder addRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return super.addRepeatedField(field, value);
        }
        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage) {
            return mergeFrom((org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }
  
        public Builder mergeFrom(org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage other) {
          if (other == org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage.getDefaultInstance()) return this;
          if (other.hasRatchetKey()) {
            setRatchetKey(other.getRatchetKey());
          }
          if (other.hasCounter()) {
            setCounter(other.getCounter());
          }
          if (other.hasPreviousCounter()) {
            setPreviousCounter(other.getPreviousCounter());
          }
          if (other.hasCiphertext()) {
            setCiphertext(other.getCiphertext());
          }
          this.mergeUnknownFields(other.unknownFields);
          onChanged();
          return this;
        }
  
        @java.lang.Override
        public final boolean isInitialized() {
          return true;
        }
  
        @java.lang.Override
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage = (org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage) e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }
        private int bitField0_;
  
        private com.google.protobuf.ByteString ratchetKey_ = com.google.protobuf.ByteString.EMPTY;
        /**
         * <code>optional bytes ratchetKey = 1;</code>
         * @return Whether the ratchetKey field is set.
         */
        @java.lang.Override
        public boolean hasRatchetKey() {
          return ((bitField0_ & 0x00000001) != 0);
        }
        /**
         * <code>optional bytes ratchetKey = 1;</code>
         * @return The ratchetKey.
         */
        @java.lang.Override
        public com.google.protobuf.ByteString getRatchetKey() {
          return ratchetKey_;
        }
        /**
         * <code>optional bytes ratchetKey = 1;</code>
         * @param value The ratchetKey to set.
         * @return This builder for chaining.
         */
        public Builder setRatchetKey(com.google.protobuf.ByteString value) {
          if (value == null) {
      throw new NullPointerException();
    }
    bitField0_ |= 0x00000001;
          ratchetKey_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional bytes ratchetKey = 1;</code>
         * @return This builder for chaining.
         */
        public Builder clearRatchetKey() {
          bitField0_ = (bitField0_ & ~0x00000001);
          ratchetKey_ = getDefaultInstance().getRatchetKey();
          onChanged();
          return this;
        }
  
        private int counter_ ;
        /**
         * <code>optional uint32 counter = 2;</code>
         * @return Whether the counter field is set.
         */
        @java.lang.Override
        public boolean hasCounter() {
          return ((bitField0_ & 0x00000002) != 0);
        }
        /**
         * <code>optional uint32 counter = 2;</code>
         * @return The counter.
         */
        @java.lang.Override
        public int getCounter() {
          return counter_;
        }
        /**
         * <code>optional uint32 counter = 2;</code>
         * @param value The counter to set.
         * @return This builder for chaining.
         */
        public Builder setCounter(int value) {
          bitField0_ |= 0x00000002;
          counter_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional uint32 counter = 2;</code>
         * @return This builder for chaining.
         */
        public Builder clearCounter() {
          bitField0_ = (bitField0_ & ~0x00000002);
          counter_ = 0;
          onChanged();
          return this;
        }
  
        private int previousCounter_ ;
        /**
         * <code>optional uint32 previousCounter = 3;</code>
         * @return Whether the previousCounter field is set.
         */
        @java.lang.Override
        public boolean hasPreviousCounter() {
          return ((bitField0_ & 0x00000004) != 0);
        }
        /**
         * <code>optional uint32 previousCounter = 3;</code>
         * @return The previousCounter.
         */
        @java.lang.Override
        public int getPreviousCounter() {
          return previousCounter_;
        }
        /**
         * <code>optional uint32 previousCounter = 3;</code>
         * @param value The previousCounter to set.
         * @return This builder for chaining.
         */
        public Builder setPreviousCounter(int value) {
          bitField0_ |= 0x00000004;
          previousCounter_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional uint32 previousCounter = 3;</code>
         * @return This builder for chaining.
         */
        public Builder clearPreviousCounter() {
          bitField0_ = (bitField0_ & ~0x00000004);
          previousCounter_ = 0;
          onChanged();
          return this;
        }
  
        private com.google.protobuf.ByteString ciphertext_ = com.google.protobuf.ByteString.EMPTY;
        /**
         * <code>optional bytes ciphertext = 4;</code>
         * @return Whether the ciphertext field is set.
         */
        @java.lang.Override
        public boolean hasCiphertext() {
          return ((bitField0_ & 0x00000008) != 0);
        }
        /**
         * <code>optional bytes ciphertext = 4;</code>
         * @return The ciphertext.
         */
        @java.lang.Override
        public com.google.protobuf.ByteString getCiphertext() {
          return ciphertext_;
        }
        /**
         * <code>optional bytes ciphertext = 4;</code>
         * @param value The ciphertext to set.
         * @return This builder for chaining.
         */
        public Builder setCiphertext(com.google.protobuf.ByteString value) {
          if (value == null) {
      throw new NullPointerException();
    }
    bitField0_ |= 0x00000008;
          ciphertext_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional bytes ciphertext = 4;</code>
         * @return This builder for chaining.
         */
        public Builder clearCiphertext() {
          bitField0_ = (bitField0_ & ~0x00000008);
          ciphertext_ = getDefaultInstance().getCiphertext();
          onChanged();
          return this;
        }
        @java.lang.Override
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFields(unknownFields);
        }
  
        @java.lang.Override
        public final Builder mergeUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.mergeUnknownFields(unknownFields);
        }
  
  
        // @@protoc_insertion_point(builder_scope:textsecure.SignalMessage)
      }
  
      // @@protoc_insertion_point(class_scope:textsecure.SignalMessage)
      private static final org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage DEFAULT_INSTANCE;
      static {
        DEFAULT_INSTANCE = new org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage();
      }
  
      public static org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }
  
      @java.lang.Deprecated public static final com.google.protobuf.Parser<SignalMessage>
          PARSER = new com.google.protobuf.AbstractParser<SignalMessage>() {
        @java.lang.Override
        public SignalMessage parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new SignalMessage(input, extensionRegistry);
        }
      };
  
      public static com.google.protobuf.Parser<SignalMessage> parser() {
        return PARSER;
      }
  
      @java.lang.Override
      public com.google.protobuf.Parser<SignalMessage> getParserForType() {
        return PARSER;
      }
  
      @java.lang.Override
      public org.whispersystems.libsignal.protocol.SignalProtos.SignalMessage getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }
  
    }
  
    public interface PreKeySignalMessageOrBuilder extends
        // @@protoc_insertion_point(interface_extends:textsecure.PreKeySignalMessage)
        com.google.protobuf.MessageOrBuilder {
  
      /**
       * <code>optional uint32 registrationId = 5;</code>
       * @return Whether the registrationId field is set.
       */
      boolean hasRegistrationId();
      /**
       * <code>optional uint32 registrationId = 5;</code>
       * @return The registrationId.
       */
      int getRegistrationId();
  
      /**
       * <code>optional uint32 preKeyId = 1;</code>
       * @return Whether the preKeyId field is set.
       */
      boolean hasPreKeyId();
      /**
       * <code>optional uint32 preKeyId = 1;</code>
       * @return The preKeyId.
       */
      int getPreKeyId();
  
      /**
       * <code>optional uint32 signedPreKeyId = 6;</code>
       * @return Whether the signedPreKeyId field is set.
       */
      boolean hasSignedPreKeyId();
      /**
       * <code>optional uint32 signedPreKeyId = 6;</code>
       * @return The signedPreKeyId.
       */
      int getSignedPreKeyId();
  
      /**
       * <code>optional bytes baseKey = 2;</code>
       * @return Whether the baseKey field is set.
       */
      boolean hasBaseKey();
      /**
       * <code>optional bytes baseKey = 2;</code>
       * @return The baseKey.
       */
      com.google.protobuf.ByteString getBaseKey();
  
      /**
       * <code>optional bytes identityKey = 3;</code>
       * @return Whether the identityKey field is set.
       */
      boolean hasIdentityKey();
      /**
       * <code>optional bytes identityKey = 3;</code>
       * @return The identityKey.
       */
      com.google.protobuf.ByteString getIdentityKey();
  
      /**
       * <pre>
       * SignalMessage
       * </pre>
       *
       * <code>optional bytes message = 4;</code>
       * @return Whether the message field is set.
       */
      boolean hasMessage();
      /**
       * <pre>
       * SignalMessage
       * </pre>
       *
       * <code>optional bytes message = 4;</code>
       * @return The message.
       */
      com.google.protobuf.ByteString getMessage();
    }
    /**
     * Protobuf type {@code textsecure.PreKeySignalMessage}
     */
    public static final class PreKeySignalMessage extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:textsecure.PreKeySignalMessage)
        PreKeySignalMessageOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use PreKeySignalMessage.newBuilder() to construct.
      private PreKeySignalMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private PreKeySignalMessage() {
        baseKey_ = com.google.protobuf.ByteString.EMPTY;
        identityKey_ = com.google.protobuf.ByteString.EMPTY;
        message_ = com.google.protobuf.ByteString.EMPTY;
      }
  
      @java.lang.Override
      @SuppressWarnings({"unused"})
      protected java.lang.Object newInstance(
          UnusedPrivateParameter unused) {
        return new PreKeySignalMessage();
      }
  
      @java.lang.Override
      public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
        return this.unknownFields;
      }
      private PreKeySignalMessage(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        this();
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
            com.google.protobuf.UnknownFieldSet.newBuilder();
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 8: {
                bitField0_ |= 0x00000002;
                preKeyId_ = input.readUInt32();
                break;
              }
              case 18: {
                bitField0_ |= 0x00000008;
                baseKey_ = input.readBytes();
                break;
              }
              case 26: {
                bitField0_ |= 0x00000010;
                identityKey_ = input.readBytes();
                break;
              }
              case 34: {
                bitField0_ |= 0x00000020;
                message_ = input.readBytes();
                break;
              }
              case 40: {
                bitField0_ |= 0x00000001;
                registrationId_ = input.readUInt32();
                break;
              }
              case 48: {
                bitField0_ |= 0x00000004;
                signedPreKeyId_ = input.readUInt32();
                break;
              }
              default: {
                if (!parseUnknownField(
                    input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
            }
          }
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(
              e).setUnfinishedMessage(this);
        } finally {
          this.unknownFields = unknownFields.build();
          makeExtensionsImmutable();
        }
      }
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_PreKeySignalMessage_descriptor;
      }
  
      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_PreKeySignalMessage_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage.class, org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage.Builder.class);
      }
  
      private int bitField0_;
      public static final int REGISTRATIONID_FIELD_NUMBER = 5;
      private int registrationId_;
      /**
       * <code>optional uint32 registrationId = 5;</code>
       * @return Whether the registrationId field is set.
       */
      @java.lang.Override
      public boolean hasRegistrationId() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <code>optional uint32 registrationId = 5;</code>
       * @return The registrationId.
       */
      @java.lang.Override
      public int getRegistrationId() {
        return registrationId_;
      }
  
      public static final int PREKEYID_FIELD_NUMBER = 1;
      private int preKeyId_;
      /**
       * <code>optional uint32 preKeyId = 1;</code>
       * @return Whether the preKeyId field is set.
       */
      @java.lang.Override
      public boolean hasPreKeyId() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <code>optional uint32 preKeyId = 1;</code>
       * @return The preKeyId.
       */
      @java.lang.Override
      public int getPreKeyId() {
        return preKeyId_;
      }
  
      public static final int SIGNEDPREKEYID_FIELD_NUMBER = 6;
      private int signedPreKeyId_;
      /**
       * <code>optional uint32 signedPreKeyId = 6;</code>
       * @return Whether the signedPreKeyId field is set.
       */
      @java.lang.Override
      public boolean hasSignedPreKeyId() {
        return ((bitField0_ & 0x00000004) != 0);
      }
      /**
       * <code>optional uint32 signedPreKeyId = 6;</code>
       * @return The signedPreKeyId.
       */
      @java.lang.Override
      public int getSignedPreKeyId() {
        return signedPreKeyId_;
      }
  
      public static final int BASEKEY_FIELD_NUMBER = 2;
      private com.google.protobuf.ByteString baseKey_;
      /**
       * <code>optional bytes baseKey = 2;</code>
       * @return Whether the baseKey field is set.
       */
      @java.lang.Override
      public boolean hasBaseKey() {
        return ((bitField0_ & 0x00000008) != 0);
      }
      /**
       * <code>optional bytes baseKey = 2;</code>
       * @return The baseKey.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getBaseKey() {
        return baseKey_;
      }
  
      public static final int IDENTITYKEY_FIELD_NUMBER = 3;
      private com.google.protobuf.ByteString identityKey_;
      /**
       * <code>optional bytes identityKey = 3;</code>
       * @return Whether the identityKey field is set.
       */
      @java.lang.Override
      public boolean hasIdentityKey() {
        return ((bitField0_ & 0x00000010) != 0);
      }
      /**
       * <code>optional bytes identityKey = 3;</code>
       * @return The identityKey.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getIdentityKey() {
        return identityKey_;
      }
  
      public static final int MESSAGE_FIELD_NUMBER = 4;
      private com.google.protobuf.ByteString message_;
      /**
       * <pre>
       * SignalMessage
       * </pre>
       *
       * <code>optional bytes message = 4;</code>
       * @return Whether the message field is set.
       */
      @java.lang.Override
      public boolean hasMessage() {
        return ((bitField0_ & 0x00000020) != 0);
      }
      /**
       * <pre>
       * SignalMessage
       * </pre>
       *
       * <code>optional bytes message = 4;</code>
       * @return The message.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getMessage() {
        return message_;
      }
  
      private byte memoizedIsInitialized = -1;
      @java.lang.Override
      public final boolean isInitialized() {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized == 1) return true;
        if (isInitialized == 0) return false;
  
        memoizedIsInitialized = 1;
        return true;
      }
  
      @java.lang.Override
      public void writeTo(com.google.protobuf.CodedOutputStream output)
                          throws java.io.IOException {
        if (((bitField0_ & 0x00000002) != 0)) {
          output.writeUInt32(1, preKeyId_);
        }
        if (((bitField0_ & 0x00000008) != 0)) {
          output.writeBytes(2, baseKey_);
        }
        if (((bitField0_ & 0x00000010) != 0)) {
          output.writeBytes(3, identityKey_);
        }
        if (((bitField0_ & 0x00000020) != 0)) {
          output.writeBytes(4, message_);
        }
        if (((bitField0_ & 0x00000001) != 0)) {
          output.writeUInt32(5, registrationId_);
        }
        if (((bitField0_ & 0x00000004) != 0)) {
          output.writeUInt32(6, signedPreKeyId_);
        }
        unknownFields.writeTo(output);
      }
  
      @java.lang.Override
      public int getSerializedSize() {
        int size = memoizedSize;
        if (size != -1) return size;
  
        size = 0;
        if (((bitField0_ & 0x00000002) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeUInt32Size(1, preKeyId_);
        }
        if (((bitField0_ & 0x00000008) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeBytesSize(2, baseKey_);
        }
        if (((bitField0_ & 0x00000010) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeBytesSize(3, identityKey_);
        }
        if (((bitField0_ & 0x00000020) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeBytesSize(4, message_);
        }
        if (((bitField0_ & 0x00000001) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeUInt32Size(5, registrationId_);
        }
        if (((bitField0_ & 0x00000004) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeUInt32Size(6, signedPreKeyId_);
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
      }
  
      @java.lang.Override
      public boolean equals(final java.lang.Object obj) {
        if (obj == this) {
         return true;
        }
        if (!(obj instanceof org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage)) {
          return super.equals(obj);
        }
        org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage other = (org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage) obj;
  
        if (hasRegistrationId() != other.hasRegistrationId()) return false;
        if (hasRegistrationId()) {
          if (getRegistrationId()
              != other.getRegistrationId()) return false;
        }
        if (hasPreKeyId() != other.hasPreKeyId()) return false;
        if (hasPreKeyId()) {
          if (getPreKeyId()
              != other.getPreKeyId()) return false;
        }
        if (hasSignedPreKeyId() != other.hasSignedPreKeyId()) return false;
        if (hasSignedPreKeyId()) {
          if (getSignedPreKeyId()
              != other.getSignedPreKeyId()) return false;
        }
        if (hasBaseKey() != other.hasBaseKey()) return false;
        if (hasBaseKey()) {
          if (!getBaseKey()
              .equals(other.getBaseKey())) return false;
        }
        if (hasIdentityKey() != other.hasIdentityKey()) return false;
        if (hasIdentityKey()) {
          if (!getIdentityKey()
              .equals(other.getIdentityKey())) return false;
        }
        if (hasMessage() != other.hasMessage()) return false;
        if (hasMessage()) {
          if (!getMessage()
              .equals(other.getMessage())) return false;
        }
        if (!unknownFields.equals(other.unknownFields)) return false;
        return true;
      }
  
      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        if (hasRegistrationId()) {
          hash = (37 * hash) + REGISTRATIONID_FIELD_NUMBER;
          hash = (53 * hash) + getRegistrationId();
        }
        if (hasPreKeyId()) {
          hash = (37 * hash) + PREKEYID_FIELD_NUMBER;
          hash = (53 * hash) + getPreKeyId();
        }
        if (hasSignedPreKeyId()) {
          hash = (37 * hash) + SIGNEDPREKEYID_FIELD_NUMBER;
          hash = (53 * hash) + getSignedPreKeyId();
        }
        if (hasBaseKey()) {
          hash = (37 * hash) + BASEKEY_FIELD_NUMBER;
          hash = (53 * hash) + getBaseKey().hashCode();
        }
        if (hasIdentityKey()) {
          hash = (37 * hash) + IDENTITYKEY_FIELD_NUMBER;
          hash = (53 * hash) + getIdentityKey().hashCode();
        }
        if (hasMessage()) {
          hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
          hash = (53 * hash) + getMessage().hashCode();
        }
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }
  
      public static org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage 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.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
  
      @java.lang.Override
      public Builder newBuilderForType() { return newBuilder(); }
      public static Builder newBuilder() {
        return DEFAULT_INSTANCE.toBuilder();
      }
      public static Builder newBuilder(org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
      }
      @java.lang.Override
      public Builder toBuilder() {
        return this == DEFAULT_INSTANCE
            ? new Builder() : new Builder().mergeFrom(this);
      }
  
      @java.lang.Override
      protected Builder newBuilderForType(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        Builder builder = new Builder(parent);
        return builder;
      }
      /**
       * Protobuf type {@code textsecure.PreKeySignalMessage}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:textsecure.PreKeySignalMessage)
          org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessageOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_PreKeySignalMessage_descriptor;
        }
  
        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_PreKeySignalMessage_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage.class, org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage.Builder.class);
        }
  
        // Construct using org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage.newBuilder()
        private Builder() {
          maybeForceBuilderInitialization();
        }
  
        private Builder(
            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
          super(parent);
          maybeForceBuilderInitialization();
        }
        private void maybeForceBuilderInitialization() {
          if (com.google.protobuf.GeneratedMessageV3
                  .alwaysUseFieldBuilders) {
          }
        }
        @java.lang.Override
        public Builder clear() {
          super.clear();
          registrationId_ = 0;
          bitField0_ = (bitField0_ & ~0x00000001);
          preKeyId_ = 0;
          bitField0_ = (bitField0_ & ~0x00000002);
          signedPreKeyId_ = 0;
          bitField0_ = (bitField0_ & ~0x00000004);
          baseKey_ = com.google.protobuf.ByteString.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000008);
          identityKey_ = com.google.protobuf.ByteString.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000010);
          message_ = com.google.protobuf.ByteString.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000020);
          return this;
        }
  
        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor
            getDescriptorForType() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_PreKeySignalMessage_descriptor;
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage getDefaultInstanceForType() {
          return org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage.getDefaultInstance();
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage build() {
          org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage buildPartial() {
          org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage result = new org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage(this);
          int from_bitField0_ = bitField0_;
          int to_bitField0_ = 0;
          if (((from_bitField0_ & 0x00000001) != 0)) {
            result.registrationId_ = registrationId_;
            to_bitField0_ |= 0x00000001;
          }
          if (((from_bitField0_ & 0x00000002) != 0)) {
            result.preKeyId_ = preKeyId_;
            to_bitField0_ |= 0x00000002;
          }
          if (((from_bitField0_ & 0x00000004) != 0)) {
            result.signedPreKeyId_ = signedPreKeyId_;
            to_bitField0_ |= 0x00000004;
          }
          if (((from_bitField0_ & 0x00000008) != 0)) {
            to_bitField0_ |= 0x00000008;
          }
          result.baseKey_ = baseKey_;
          if (((from_bitField0_ & 0x00000010) != 0)) {
            to_bitField0_ |= 0x00000010;
          }
          result.identityKey_ = identityKey_;
          if (((from_bitField0_ & 0x00000020) != 0)) {
            to_bitField0_ |= 0x00000020;
          }
          result.message_ = message_;
          result.bitField0_ = to_bitField0_;
          onBuilt();
          return result;
        }
  
        @java.lang.Override
        public Builder clone() {
          return super.clone();
        }
        @java.lang.Override
        public Builder setField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return super.setField(field, value);
        }
        @java.lang.Override
        public Builder clearField(
            com.google.protobuf.Descriptors.FieldDescriptor field) {
          return super.clearField(field);
        }
        @java.lang.Override
        public Builder clearOneof(
            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
          return super.clearOneof(oneof);
        }
        @java.lang.Override
        public Builder setRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            int index, java.lang.Object value) {
          return super.setRepeatedField(field, index, value);
        }
        @java.lang.Override
        public Builder addRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return super.addRepeatedField(field, value);
        }
        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage) {
            return mergeFrom((org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }
  
        public Builder mergeFrom(org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage other) {
          if (other == org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage.getDefaultInstance()) return this;
          if (other.hasRegistrationId()) {
            setRegistrationId(other.getRegistrationId());
          }
          if (other.hasPreKeyId()) {
            setPreKeyId(other.getPreKeyId());
          }
          if (other.hasSignedPreKeyId()) {
            setSignedPreKeyId(other.getSignedPreKeyId());
          }
          if (other.hasBaseKey()) {
            setBaseKey(other.getBaseKey());
          }
          if (other.hasIdentityKey()) {
            setIdentityKey(other.getIdentityKey());
          }
          if (other.hasMessage()) {
            setMessage(other.getMessage());
          }
          this.mergeUnknownFields(other.unknownFields);
          onChanged();
          return this;
        }
  
        @java.lang.Override
        public final boolean isInitialized() {
          return true;
        }
  
        @java.lang.Override
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage = (org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage) e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }
        private int bitField0_;
  
        private int registrationId_ ;
        /**
         * <code>optional uint32 registrationId = 5;</code>
         * @return Whether the registrationId field is set.
         */
        @java.lang.Override
        public boolean hasRegistrationId() {
          return ((bitField0_ & 0x00000001) != 0);
        }
        /**
         * <code>optional uint32 registrationId = 5;</code>
         * @return The registrationId.
         */
        @java.lang.Override
        public int getRegistrationId() {
          return registrationId_;
        }
        /**
         * <code>optional uint32 registrationId = 5;</code>
         * @param value The registrationId to set.
         * @return This builder for chaining.
         */
        public Builder setRegistrationId(int value) {
          bitField0_ |= 0x00000001;
          registrationId_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional uint32 registrationId = 5;</code>
         * @return This builder for chaining.
         */
        public Builder clearRegistrationId() {
          bitField0_ = (bitField0_ & ~0x00000001);
          registrationId_ = 0;
          onChanged();
          return this;
        }
  
        private int preKeyId_ ;
        /**
         * <code>optional uint32 preKeyId = 1;</code>
         * @return Whether the preKeyId field is set.
         */
        @java.lang.Override
        public boolean hasPreKeyId() {
          return ((bitField0_ & 0x00000002) != 0);
        }
        /**
         * <code>optional uint32 preKeyId = 1;</code>
         * @return The preKeyId.
         */
        @java.lang.Override
        public int getPreKeyId() {
          return preKeyId_;
        }
        /**
         * <code>optional uint32 preKeyId = 1;</code>
         * @param value The preKeyId to set.
         * @return This builder for chaining.
         */
        public Builder setPreKeyId(int value) {
          bitField0_ |= 0x00000002;
          preKeyId_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional uint32 preKeyId = 1;</code>
         * @return This builder for chaining.
         */
        public Builder clearPreKeyId() {
          bitField0_ = (bitField0_ & ~0x00000002);
          preKeyId_ = 0;
          onChanged();
          return this;
        }
  
        private int signedPreKeyId_ ;
        /**
         * <code>optional uint32 signedPreKeyId = 6;</code>
         * @return Whether the signedPreKeyId field is set.
         */
        @java.lang.Override
        public boolean hasSignedPreKeyId() {
          return ((bitField0_ & 0x00000004) != 0);
        }
        /**
         * <code>optional uint32 signedPreKeyId = 6;</code>
         * @return The signedPreKeyId.
         */
        @java.lang.Override
        public int getSignedPreKeyId() {
          return signedPreKeyId_;
        }
        /**
         * <code>optional uint32 signedPreKeyId = 6;</code>
         * @param value The signedPreKeyId to set.
         * @return This builder for chaining.
         */
        public Builder setSignedPreKeyId(int value) {
          bitField0_ |= 0x00000004;
          signedPreKeyId_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional uint32 signedPreKeyId = 6;</code>
         * @return This builder for chaining.
         */
        public Builder clearSignedPreKeyId() {
          bitField0_ = (bitField0_ & ~0x00000004);
          signedPreKeyId_ = 0;
          onChanged();
          return this;
        }
  
        private com.google.protobuf.ByteString baseKey_ = com.google.protobuf.ByteString.EMPTY;
        /**
         * <code>optional bytes baseKey = 2;</code>
         * @return Whether the baseKey field is set.
         */
        @java.lang.Override
        public boolean hasBaseKey() {
          return ((bitField0_ & 0x00000008) != 0);
        }
        /**
         * <code>optional bytes baseKey = 2;</code>
         * @return The baseKey.
         */
        @java.lang.Override
        public com.google.protobuf.ByteString getBaseKey() {
          return baseKey_;
        }
        /**
         * <code>optional bytes baseKey = 2;</code>
         * @param value The baseKey to set.
         * @return This builder for chaining.
         */
        public Builder setBaseKey(com.google.protobuf.ByteString value) {
          if (value == null) {
      throw new NullPointerException();
    }
    bitField0_ |= 0x00000008;
          baseKey_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional bytes baseKey = 2;</code>
         * @return This builder for chaining.
         */
        public Builder clearBaseKey() {
          bitField0_ = (bitField0_ & ~0x00000008);
          baseKey_ = getDefaultInstance().getBaseKey();
          onChanged();
          return this;
        }
  
        private com.google.protobuf.ByteString identityKey_ = com.google.protobuf.ByteString.EMPTY;
        /**
         * <code>optional bytes identityKey = 3;</code>
         * @return Whether the identityKey field is set.
         */
        @java.lang.Override
        public boolean hasIdentityKey() {
          return ((bitField0_ & 0x00000010) != 0);
        }
        /**
         * <code>optional bytes identityKey = 3;</code>
         * @return The identityKey.
         */
        @java.lang.Override
        public com.google.protobuf.ByteString getIdentityKey() {
          return identityKey_;
        }
        /**
         * <code>optional bytes identityKey = 3;</code>
         * @param value The identityKey to set.
         * @return This builder for chaining.
         */
        public Builder setIdentityKey(com.google.protobuf.ByteString value) {
          if (value == null) {
      throw new NullPointerException();
    }
    bitField0_ |= 0x00000010;
          identityKey_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional bytes identityKey = 3;</code>
         * @return This builder for chaining.
         */
        public Builder clearIdentityKey() {
          bitField0_ = (bitField0_ & ~0x00000010);
          identityKey_ = getDefaultInstance().getIdentityKey();
          onChanged();
          return this;
        }
  
        private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY;
        /**
         * <pre>
         * SignalMessage
         * </pre>
         *
         * <code>optional bytes message = 4;</code>
         * @return Whether the message field is set.
         */
        @java.lang.Override
        public boolean hasMessage() {
          return ((bitField0_ & 0x00000020) != 0);
        }
        /**
         * <pre>
         * SignalMessage
         * </pre>
         *
         * <code>optional bytes message = 4;</code>
         * @return The message.
         */
        @java.lang.Override
        public com.google.protobuf.ByteString getMessage() {
          return message_;
        }
        /**
         * <pre>
         * SignalMessage
         * </pre>
         *
         * <code>optional bytes message = 4;</code>
         * @param value The message to set.
         * @return This builder for chaining.
         */
        public Builder setMessage(com.google.protobuf.ByteString value) {
          if (value == null) {
      throw new NullPointerException();
    }
    bitField0_ |= 0x00000020;
          message_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * SignalMessage
         * </pre>
         *
         * <code>optional bytes message = 4;</code>
         * @return This builder for chaining.
         */
        public Builder clearMessage() {
          bitField0_ = (bitField0_ & ~0x00000020);
          message_ = getDefaultInstance().getMessage();
          onChanged();
          return this;
        }
        @java.lang.Override
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFields(unknownFields);
        }
  
        @java.lang.Override
        public final Builder mergeUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.mergeUnknownFields(unknownFields);
        }
  
  
        // @@protoc_insertion_point(builder_scope:textsecure.PreKeySignalMessage)
      }
  
      // @@protoc_insertion_point(class_scope:textsecure.PreKeySignalMessage)
      private static final org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage DEFAULT_INSTANCE;
      static {
        DEFAULT_INSTANCE = new org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage();
      }
  
      public static org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }
  
      @java.lang.Deprecated public static final com.google.protobuf.Parser<PreKeySignalMessage>
          PARSER = new com.google.protobuf.AbstractParser<PreKeySignalMessage>() {
        @java.lang.Override
        public PreKeySignalMessage parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new PreKeySignalMessage(input, extensionRegistry);
        }
      };
  
      public static com.google.protobuf.Parser<PreKeySignalMessage> parser() {
        return PARSER;
      }
  
      @java.lang.Override
      public com.google.protobuf.Parser<PreKeySignalMessage> getParserForType() {
        return PARSER;
      }
  
      @java.lang.Override
      public org.whispersystems.libsignal.protocol.SignalProtos.PreKeySignalMessage getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }
  
    }
  
    public interface KeyExchangeMessageOrBuilder extends
        // @@protoc_insertion_point(interface_extends:textsecure.KeyExchangeMessage)
        com.google.protobuf.MessageOrBuilder {
  
      /**
       * <code>optional uint32 id = 1;</code>
       * @return Whether the id field is set.
       */
      boolean hasId();
      /**
       * <code>optional uint32 id = 1;</code>
       * @return The id.
       */
      int getId();
  
      /**
       * <code>optional bytes baseKey = 2;</code>
       * @return Whether the baseKey field is set.
       */
      boolean hasBaseKey();
      /**
       * <code>optional bytes baseKey = 2;</code>
       * @return The baseKey.
       */
      com.google.protobuf.ByteString getBaseKey();
  
      /**
       * <code>optional bytes ratchetKey = 3;</code>
       * @return Whether the ratchetKey field is set.
       */
      boolean hasRatchetKey();
      /**
       * <code>optional bytes ratchetKey = 3;</code>
       * @return The ratchetKey.
       */
      com.google.protobuf.ByteString getRatchetKey();
  
      /**
       * <code>optional bytes identityKey = 4;</code>
       * @return Whether the identityKey field is set.
       */
      boolean hasIdentityKey();
      /**
       * <code>optional bytes identityKey = 4;</code>
       * @return The identityKey.
       */
      com.google.protobuf.ByteString getIdentityKey();
  
      /**
       * <code>optional bytes baseKeySignature = 5;</code>
       * @return Whether the baseKeySignature field is set.
       */
      boolean hasBaseKeySignature();
      /**
       * <code>optional bytes baseKeySignature = 5;</code>
       * @return The baseKeySignature.
       */
      com.google.protobuf.ByteString getBaseKeySignature();
    }
    /**
     * Protobuf type {@code textsecure.KeyExchangeMessage}
     */
    public static final class KeyExchangeMessage extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:textsecure.KeyExchangeMessage)
        KeyExchangeMessageOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use KeyExchangeMessage.newBuilder() to construct.
      private KeyExchangeMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private KeyExchangeMessage() {
        baseKey_ = com.google.protobuf.ByteString.EMPTY;
        ratchetKey_ = com.google.protobuf.ByteString.EMPTY;
        identityKey_ = com.google.protobuf.ByteString.EMPTY;
        baseKeySignature_ = com.google.protobuf.ByteString.EMPTY;
      }
  
      @java.lang.Override
      @SuppressWarnings({"unused"})
      protected java.lang.Object newInstance(
          UnusedPrivateParameter unused) {
        return new KeyExchangeMessage();
      }
  
      @java.lang.Override
      public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
        return this.unknownFields;
      }
      private KeyExchangeMessage(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        this();
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
            com.google.protobuf.UnknownFieldSet.newBuilder();
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 8: {
                bitField0_ |= 0x00000001;
                id_ = input.readUInt32();
                break;
              }
              case 18: {
                bitField0_ |= 0x00000002;
                baseKey_ = input.readBytes();
                break;
              }
              case 26: {
                bitField0_ |= 0x00000004;
                ratchetKey_ = input.readBytes();
                break;
              }
              case 34: {
                bitField0_ |= 0x00000008;
                identityKey_ = input.readBytes();
                break;
              }
              case 42: {
                bitField0_ |= 0x00000010;
                baseKeySignature_ = input.readBytes();
                break;
              }
              default: {
                if (!parseUnknownField(
                    input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
            }
          }
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(
              e).setUnfinishedMessage(this);
        } finally {
          this.unknownFields = unknownFields.build();
          makeExtensionsImmutable();
        }
      }
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_KeyExchangeMessage_descriptor;
      }
  
      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_KeyExchangeMessage_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage.class, org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage.Builder.class);
      }
  
      private int bitField0_;
      public static final int ID_FIELD_NUMBER = 1;
      private int id_;
      /**
       * <code>optional uint32 id = 1;</code>
       * @return Whether the id field is set.
       */
      @java.lang.Override
      public boolean hasId() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <code>optional uint32 id = 1;</code>
       * @return The id.
       */
      @java.lang.Override
      public int getId() {
        return id_;
      }
  
      public static final int BASEKEY_FIELD_NUMBER = 2;
      private com.google.protobuf.ByteString baseKey_;
      /**
       * <code>optional bytes baseKey = 2;</code>
       * @return Whether the baseKey field is set.
       */
      @java.lang.Override
      public boolean hasBaseKey() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <code>optional bytes baseKey = 2;</code>
       * @return The baseKey.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getBaseKey() {
        return baseKey_;
      }
  
      public static final int RATCHETKEY_FIELD_NUMBER = 3;
      private com.google.protobuf.ByteString ratchetKey_;
      /**
       * <code>optional bytes ratchetKey = 3;</code>
       * @return Whether the ratchetKey field is set.
       */
      @java.lang.Override
      public boolean hasRatchetKey() {
        return ((bitField0_ & 0x00000004) != 0);
      }
      /**
       * <code>optional bytes ratchetKey = 3;</code>
       * @return The ratchetKey.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getRatchetKey() {
        return ratchetKey_;
      }
  
      public static final int IDENTITYKEY_FIELD_NUMBER = 4;
      private com.google.protobuf.ByteString identityKey_;
      /**
       * <code>optional bytes identityKey = 4;</code>
       * @return Whether the identityKey field is set.
       */
      @java.lang.Override
      public boolean hasIdentityKey() {
        return ((bitField0_ & 0x00000008) != 0);
      }
      /**
       * <code>optional bytes identityKey = 4;</code>
       * @return The identityKey.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getIdentityKey() {
        return identityKey_;
      }
  
      public static final int BASEKEYSIGNATURE_FIELD_NUMBER = 5;
      private com.google.protobuf.ByteString baseKeySignature_;
      /**
       * <code>optional bytes baseKeySignature = 5;</code>
       * @return Whether the baseKeySignature field is set.
       */
      @java.lang.Override
      public boolean hasBaseKeySignature() {
        return ((bitField0_ & 0x00000010) != 0);
      }
      /**
       * <code>optional bytes baseKeySignature = 5;</code>
       * @return The baseKeySignature.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getBaseKeySignature() {
        return baseKeySignature_;
      }
  
      private byte memoizedIsInitialized = -1;
      @java.lang.Override
      public final boolean isInitialized() {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized == 1) return true;
        if (isInitialized == 0) return false;
  
        memoizedIsInitialized = 1;
        return true;
      }
  
      @java.lang.Override
      public void writeTo(com.google.protobuf.CodedOutputStream output)
                          throws java.io.IOException {
        if (((bitField0_ & 0x00000001) != 0)) {
          output.writeUInt32(1, id_);
        }
        if (((bitField0_ & 0x00000002) != 0)) {
          output.writeBytes(2, baseKey_);
        }
        if (((bitField0_ & 0x00000004) != 0)) {
          output.writeBytes(3, ratchetKey_);
        }
        if (((bitField0_ & 0x00000008) != 0)) {
          output.writeBytes(4, identityKey_);
        }
        if (((bitField0_ & 0x00000010) != 0)) {
          output.writeBytes(5, baseKeySignature_);
        }
        unknownFields.writeTo(output);
      }
  
      @java.lang.Override
      public int getSerializedSize() {
        int size = memoizedSize;
        if (size != -1) return size;
  
        size = 0;
        if (((bitField0_ & 0x00000001) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeUInt32Size(1, id_);
        }
        if (((bitField0_ & 0x00000002) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeBytesSize(2, baseKey_);
        }
        if (((bitField0_ & 0x00000004) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeBytesSize(3, ratchetKey_);
        }
        if (((bitField0_ & 0x00000008) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeBytesSize(4, identityKey_);
        }
        if (((bitField0_ & 0x00000010) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeBytesSize(5, baseKeySignature_);
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
      }
  
      @java.lang.Override
      public boolean equals(final java.lang.Object obj) {
        if (obj == this) {
         return true;
        }
        if (!(obj instanceof org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage)) {
          return super.equals(obj);
        }
        org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage other = (org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage) obj;
  
        if (hasId() != other.hasId()) return false;
        if (hasId()) {
          if (getId()
              != other.getId()) return false;
        }
        if (hasBaseKey() != other.hasBaseKey()) return false;
        if (hasBaseKey()) {
          if (!getBaseKey()
              .equals(other.getBaseKey())) return false;
        }
        if (hasRatchetKey() != other.hasRatchetKey()) return false;
        if (hasRatchetKey()) {
          if (!getRatchetKey()
              .equals(other.getRatchetKey())) return false;
        }
        if (hasIdentityKey() != other.hasIdentityKey()) return false;
        if (hasIdentityKey()) {
          if (!getIdentityKey()
              .equals(other.getIdentityKey())) return false;
        }
        if (hasBaseKeySignature() != other.hasBaseKeySignature()) return false;
        if (hasBaseKeySignature()) {
          if (!getBaseKeySignature()
              .equals(other.getBaseKeySignature())) return false;
        }
        if (!unknownFields.equals(other.unknownFields)) return false;
        return true;
      }
  
      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        if (hasId()) {
          hash = (37 * hash) + ID_FIELD_NUMBER;
          hash = (53 * hash) + getId();
        }
        if (hasBaseKey()) {
          hash = (37 * hash) + BASEKEY_FIELD_NUMBER;
          hash = (53 * hash) + getBaseKey().hashCode();
        }
        if (hasRatchetKey()) {
          hash = (37 * hash) + RATCHETKEY_FIELD_NUMBER;
          hash = (53 * hash) + getRatchetKey().hashCode();
        }
        if (hasIdentityKey()) {
          hash = (37 * hash) + IDENTITYKEY_FIELD_NUMBER;
          hash = (53 * hash) + getIdentityKey().hashCode();
        }
        if (hasBaseKeySignature()) {
          hash = (37 * hash) + BASEKEYSIGNATURE_FIELD_NUMBER;
          hash = (53 * hash) + getBaseKeySignature().hashCode();
        }
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }
  
      public static org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage 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.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
  
      @java.lang.Override
      public Builder newBuilderForType() { return newBuilder(); }
      public static Builder newBuilder() {
        return DEFAULT_INSTANCE.toBuilder();
      }
      public static Builder newBuilder(org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
      }
      @java.lang.Override
      public Builder toBuilder() {
        return this == DEFAULT_INSTANCE
            ? new Builder() : new Builder().mergeFrom(this);
      }
  
      @java.lang.Override
      protected Builder newBuilderForType(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        Builder builder = new Builder(parent);
        return builder;
      }
      /**
       * Protobuf type {@code textsecure.KeyExchangeMessage}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:textsecure.KeyExchangeMessage)
          org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessageOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_KeyExchangeMessage_descriptor;
        }
  
        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_KeyExchangeMessage_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage.class, org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage.Builder.class);
        }
  
        // Construct using org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage.newBuilder()
        private Builder() {
          maybeForceBuilderInitialization();
        }
  
        private Builder(
            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
          super(parent);
          maybeForceBuilderInitialization();
        }
        private void maybeForceBuilderInitialization() {
          if (com.google.protobuf.GeneratedMessageV3
                  .alwaysUseFieldBuilders) {
          }
        }
        @java.lang.Override
        public Builder clear() {
          super.clear();
          id_ = 0;
          bitField0_ = (bitField0_ & ~0x00000001);
          baseKey_ = com.google.protobuf.ByteString.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000002);
          ratchetKey_ = com.google.protobuf.ByteString.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000004);
          identityKey_ = com.google.protobuf.ByteString.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000008);
          baseKeySignature_ = com.google.protobuf.ByteString.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000010);
          return this;
        }
  
        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor
            getDescriptorForType() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_KeyExchangeMessage_descriptor;
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage getDefaultInstanceForType() {
          return org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage.getDefaultInstance();
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage build() {
          org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage buildPartial() {
          org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage result = new org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage(this);
          int from_bitField0_ = bitField0_;
          int to_bitField0_ = 0;
          if (((from_bitField0_ & 0x00000001) != 0)) {
            result.id_ = id_;
            to_bitField0_ |= 0x00000001;
          }
          if (((from_bitField0_ & 0x00000002) != 0)) {
            to_bitField0_ |= 0x00000002;
          }
          result.baseKey_ = baseKey_;
          if (((from_bitField0_ & 0x00000004) != 0)) {
            to_bitField0_ |= 0x00000004;
          }
          result.ratchetKey_ = ratchetKey_;
          if (((from_bitField0_ & 0x00000008) != 0)) {
            to_bitField0_ |= 0x00000008;
          }
          result.identityKey_ = identityKey_;
          if (((from_bitField0_ & 0x00000010) != 0)) {
            to_bitField0_ |= 0x00000010;
          }
          result.baseKeySignature_ = baseKeySignature_;
          result.bitField0_ = to_bitField0_;
          onBuilt();
          return result;
        }
  
        @java.lang.Override
        public Builder clone() {
          return super.clone();
        }
        @java.lang.Override
        public Builder setField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return super.setField(field, value);
        }
        @java.lang.Override
        public Builder clearField(
            com.google.protobuf.Descriptors.FieldDescriptor field) {
          return super.clearField(field);
        }
        @java.lang.Override
        public Builder clearOneof(
            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
          return super.clearOneof(oneof);
        }
        @java.lang.Override
        public Builder setRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            int index, java.lang.Object value) {
          return super.setRepeatedField(field, index, value);
        }
        @java.lang.Override
        public Builder addRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return super.addRepeatedField(field, value);
        }
        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage) {
            return mergeFrom((org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }
  
        public Builder mergeFrom(org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage other) {
          if (other == org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage.getDefaultInstance()) return this;
          if (other.hasId()) {
            setId(other.getId());
          }
          if (other.hasBaseKey()) {
            setBaseKey(other.getBaseKey());
          }
          if (other.hasRatchetKey()) {
            setRatchetKey(other.getRatchetKey());
          }
          if (other.hasIdentityKey()) {
            setIdentityKey(other.getIdentityKey());
          }
          if (other.hasBaseKeySignature()) {
            setBaseKeySignature(other.getBaseKeySignature());
          }
          this.mergeUnknownFields(other.unknownFields);
          onChanged();
          return this;
        }
  
        @java.lang.Override
        public final boolean isInitialized() {
          return true;
        }
  
        @java.lang.Override
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage = (org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage) e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }
        private int bitField0_;
  
        private int id_ ;
        /**
         * <code>optional uint32 id = 1;</code>
         * @return Whether the id field is set.
         */
        @java.lang.Override
        public boolean hasId() {
          return ((bitField0_ & 0x00000001) != 0);
        }
        /**
         * <code>optional uint32 id = 1;</code>
         * @return The id.
         */
        @java.lang.Override
        public int getId() {
          return id_;
        }
        /**
         * <code>optional uint32 id = 1;</code>
         * @param value The id to set.
         * @return This builder for chaining.
         */
        public Builder setId(int value) {
          bitField0_ |= 0x00000001;
          id_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional uint32 id = 1;</code>
         * @return This builder for chaining.
         */
        public Builder clearId() {
          bitField0_ = (bitField0_ & ~0x00000001);
          id_ = 0;
          onChanged();
          return this;
        }
  
        private com.google.protobuf.ByteString baseKey_ = com.google.protobuf.ByteString.EMPTY;
        /**
         * <code>optional bytes baseKey = 2;</code>
         * @return Whether the baseKey field is set.
         */
        @java.lang.Override
        public boolean hasBaseKey() {
          return ((bitField0_ & 0x00000002) != 0);
        }
        /**
         * <code>optional bytes baseKey = 2;</code>
         * @return The baseKey.
         */
        @java.lang.Override
        public com.google.protobuf.ByteString getBaseKey() {
          return baseKey_;
        }
        /**
         * <code>optional bytes baseKey = 2;</code>
         * @param value The baseKey to set.
         * @return This builder for chaining.
         */
        public Builder setBaseKey(com.google.protobuf.ByteString value) {
          if (value == null) {
      throw new NullPointerException();
    }
    bitField0_ |= 0x00000002;
          baseKey_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional bytes baseKey = 2;</code>
         * @return This builder for chaining.
         */
        public Builder clearBaseKey() {
          bitField0_ = (bitField0_ & ~0x00000002);
          baseKey_ = getDefaultInstance().getBaseKey();
          onChanged();
          return this;
        }
  
        private com.google.protobuf.ByteString ratchetKey_ = com.google.protobuf.ByteString.EMPTY;
        /**
         * <code>optional bytes ratchetKey = 3;</code>
         * @return Whether the ratchetKey field is set.
         */
        @java.lang.Override
        public boolean hasRatchetKey() {
          return ((bitField0_ & 0x00000004) != 0);
        }
        /**
         * <code>optional bytes ratchetKey = 3;</code>
         * @return The ratchetKey.
         */
        @java.lang.Override
        public com.google.protobuf.ByteString getRatchetKey() {
          return ratchetKey_;
        }
        /**
         * <code>optional bytes ratchetKey = 3;</code>
         * @param value The ratchetKey to set.
         * @return This builder for chaining.
         */
        public Builder setRatchetKey(com.google.protobuf.ByteString value) {
          if (value == null) {
      throw new NullPointerException();
    }
    bitField0_ |= 0x00000004;
          ratchetKey_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional bytes ratchetKey = 3;</code>
         * @return This builder for chaining.
         */
        public Builder clearRatchetKey() {
          bitField0_ = (bitField0_ & ~0x00000004);
          ratchetKey_ = getDefaultInstance().getRatchetKey();
          onChanged();
          return this;
        }
  
        private com.google.protobuf.ByteString identityKey_ = com.google.protobuf.ByteString.EMPTY;
        /**
         * <code>optional bytes identityKey = 4;</code>
         * @return Whether the identityKey field is set.
         */
        @java.lang.Override
        public boolean hasIdentityKey() {
          return ((bitField0_ & 0x00000008) != 0);
        }
        /**
         * <code>optional bytes identityKey = 4;</code>
         * @return The identityKey.
         */
        @java.lang.Override
        public com.google.protobuf.ByteString getIdentityKey() {
          return identityKey_;
        }
        /**
         * <code>optional bytes identityKey = 4;</code>
         * @param value The identityKey to set.
         * @return This builder for chaining.
         */
        public Builder setIdentityKey(com.google.protobuf.ByteString value) {
          if (value == null) {
      throw new NullPointerException();
    }
    bitField0_ |= 0x00000008;
          identityKey_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional bytes identityKey = 4;</code>
         * @return This builder for chaining.
         */
        public Builder clearIdentityKey() {
          bitField0_ = (bitField0_ & ~0x00000008);
          identityKey_ = getDefaultInstance().getIdentityKey();
          onChanged();
          return this;
        }
  
        private com.google.protobuf.ByteString baseKeySignature_ = com.google.protobuf.ByteString.EMPTY;
        /**
         * <code>optional bytes baseKeySignature = 5;</code>
         * @return Whether the baseKeySignature field is set.
         */
        @java.lang.Override
        public boolean hasBaseKeySignature() {
          return ((bitField0_ & 0x00000010) != 0);
        }
        /**
         * <code>optional bytes baseKeySignature = 5;</code>
         * @return The baseKeySignature.
         */
        @java.lang.Override
        public com.google.protobuf.ByteString getBaseKeySignature() {
          return baseKeySignature_;
        }
        /**
         * <code>optional bytes baseKeySignature = 5;</code>
         * @param value The baseKeySignature to set.
         * @return This builder for chaining.
         */
        public Builder setBaseKeySignature(com.google.protobuf.ByteString value) {
          if (value == null) {
      throw new NullPointerException();
    }
    bitField0_ |= 0x00000010;
          baseKeySignature_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional bytes baseKeySignature = 5;</code>
         * @return This builder for chaining.
         */
        public Builder clearBaseKeySignature() {
          bitField0_ = (bitField0_ & ~0x00000010);
          baseKeySignature_ = getDefaultInstance().getBaseKeySignature();
          onChanged();
          return this;
        }
        @java.lang.Override
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFields(unknownFields);
        }
  
        @java.lang.Override
        public final Builder mergeUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.mergeUnknownFields(unknownFields);
        }
  
  
        // @@protoc_insertion_point(builder_scope:textsecure.KeyExchangeMessage)
      }
  
      // @@protoc_insertion_point(class_scope:textsecure.KeyExchangeMessage)
      private static final org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage DEFAULT_INSTANCE;
      static {
        DEFAULT_INSTANCE = new org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage();
      }
  
      public static org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }
  
      @java.lang.Deprecated public static final com.google.protobuf.Parser<KeyExchangeMessage>
          PARSER = new com.google.protobuf.AbstractParser<KeyExchangeMessage>() {
        @java.lang.Override
        public KeyExchangeMessage parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new KeyExchangeMessage(input, extensionRegistry);
        }
      };
  
      public static com.google.protobuf.Parser<KeyExchangeMessage> parser() {
        return PARSER;
      }
  
      @java.lang.Override
      public com.google.protobuf.Parser<KeyExchangeMessage> getParserForType() {
        return PARSER;
      }
  
      @java.lang.Override
      public org.whispersystems.libsignal.protocol.SignalProtos.KeyExchangeMessage getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }
  
    }
  
    public interface SenderKeyMessageOrBuilder extends
        // @@protoc_insertion_point(interface_extends:textsecure.SenderKeyMessage)
        com.google.protobuf.MessageOrBuilder {
  
      /**
       * <code>optional uint32 id = 1;</code>
       * @return Whether the id field is set.
       */
      boolean hasId();
      /**
       * <code>optional uint32 id = 1;</code>
       * @return The id.
       */
      int getId();
  
      /**
       * <code>optional uint32 iteration = 2;</code>
       * @return Whether the iteration field is set.
       */
      boolean hasIteration();
      /**
       * <code>optional uint32 iteration = 2;</code>
       * @return The iteration.
       */
      int getIteration();
  
      /**
       * <code>optional bytes ciphertext = 3;</code>
       * @return Whether the ciphertext field is set.
       */
      boolean hasCiphertext();
      /**
       * <code>optional bytes ciphertext = 3;</code>
       * @return The ciphertext.
       */
      com.google.protobuf.ByteString getCiphertext();
    }
    /**
     * Protobuf type {@code textsecure.SenderKeyMessage}
     */
    public static final class SenderKeyMessage extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:textsecure.SenderKeyMessage)
        SenderKeyMessageOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use SenderKeyMessage.newBuilder() to construct.
      private SenderKeyMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private SenderKeyMessage() {
        ciphertext_ = com.google.protobuf.ByteString.EMPTY;
      }
  
      @java.lang.Override
      @SuppressWarnings({"unused"})
      protected java.lang.Object newInstance(
          UnusedPrivateParameter unused) {
        return new SenderKeyMessage();
      }
  
      @java.lang.Override
      public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
        return this.unknownFields;
      }
      private SenderKeyMessage(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        this();
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
            com.google.protobuf.UnknownFieldSet.newBuilder();
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 8: {
                bitField0_ |= 0x00000001;
                id_ = input.readUInt32();
                break;
              }
              case 16: {
                bitField0_ |= 0x00000002;
                iteration_ = input.readUInt32();
                break;
              }
              case 26: {
                bitField0_ |= 0x00000004;
                ciphertext_ = input.readBytes();
                break;
              }
              default: {
                if (!parseUnknownField(
                    input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
            }
          }
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(
              e).setUnfinishedMessage(this);
        } finally {
          this.unknownFields = unknownFields.build();
          makeExtensionsImmutable();
        }
      }
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyMessage_descriptor;
      }
  
      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyMessage_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage.class, org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage.Builder.class);
      }
  
      private int bitField0_;
      public static final int ID_FIELD_NUMBER = 1;
      private int id_;
      /**
       * <code>optional uint32 id = 1;</code>
       * @return Whether the id field is set.
       */
      @java.lang.Override
      public boolean hasId() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <code>optional uint32 id = 1;</code>
       * @return The id.
       */
      @java.lang.Override
      public int getId() {
        return id_;
      }
  
      public static final int ITERATION_FIELD_NUMBER = 2;
      private int iteration_;
      /**
       * <code>optional uint32 iteration = 2;</code>
       * @return Whether the iteration field is set.
       */
      @java.lang.Override
      public boolean hasIteration() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <code>optional uint32 iteration = 2;</code>
       * @return The iteration.
       */
      @java.lang.Override
      public int getIteration() {
        return iteration_;
      }
  
      public static final int CIPHERTEXT_FIELD_NUMBER = 3;
      private com.google.protobuf.ByteString ciphertext_;
      /**
       * <code>optional bytes ciphertext = 3;</code>
       * @return Whether the ciphertext field is set.
       */
      @java.lang.Override
      public boolean hasCiphertext() {
        return ((bitField0_ & 0x00000004) != 0);
      }
      /**
       * <code>optional bytes ciphertext = 3;</code>
       * @return The ciphertext.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getCiphertext() {
        return ciphertext_;
      }
  
      private byte memoizedIsInitialized = -1;
      @java.lang.Override
      public final boolean isInitialized() {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized == 1) return true;
        if (isInitialized == 0) return false;
  
        memoizedIsInitialized = 1;
        return true;
      }
  
      @java.lang.Override
      public void writeTo(com.google.protobuf.CodedOutputStream output)
                          throws java.io.IOException {
        if (((bitField0_ & 0x00000001) != 0)) {
          output.writeUInt32(1, id_);
        }
        if (((bitField0_ & 0x00000002) != 0)) {
          output.writeUInt32(2, iteration_);
        }
        if (((bitField0_ & 0x00000004) != 0)) {
          output.writeBytes(3, ciphertext_);
        }
        unknownFields.writeTo(output);
      }
  
      @java.lang.Override
      public int getSerializedSize() {
        int size = memoizedSize;
        if (size != -1) return size;
  
        size = 0;
        if (((bitField0_ & 0x00000001) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeUInt32Size(1, id_);
        }
        if (((bitField0_ & 0x00000002) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeUInt32Size(2, iteration_);
        }
        if (((bitField0_ & 0x00000004) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeBytesSize(3, ciphertext_);
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
      }
  
      @java.lang.Override
      public boolean equals(final java.lang.Object obj) {
        if (obj == this) {
         return true;
        }
        if (!(obj instanceof org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage)) {
          return super.equals(obj);
        }
        org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage other = (org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage) obj;
  
        if (hasId() != other.hasId()) return false;
        if (hasId()) {
          if (getId()
              != other.getId()) return false;
        }
        if (hasIteration() != other.hasIteration()) return false;
        if (hasIteration()) {
          if (getIteration()
              != other.getIteration()) return false;
        }
        if (hasCiphertext() != other.hasCiphertext()) return false;
        if (hasCiphertext()) {
          if (!getCiphertext()
              .equals(other.getCiphertext())) return false;
        }
        if (!unknownFields.equals(other.unknownFields)) return false;
        return true;
      }
  
      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        if (hasId()) {
          hash = (37 * hash) + ID_FIELD_NUMBER;
          hash = (53 * hash) + getId();
        }
        if (hasIteration()) {
          hash = (37 * hash) + ITERATION_FIELD_NUMBER;
          hash = (53 * hash) + getIteration();
        }
        if (hasCiphertext()) {
          hash = (37 * hash) + CIPHERTEXT_FIELD_NUMBER;
          hash = (53 * hash) + getCiphertext().hashCode();
        }
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }
  
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage 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.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
  
      @java.lang.Override
      public Builder newBuilderForType() { return newBuilder(); }
      public static Builder newBuilder() {
        return DEFAULT_INSTANCE.toBuilder();
      }
      public static Builder newBuilder(org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
      }
      @java.lang.Override
      public Builder toBuilder() {
        return this == DEFAULT_INSTANCE
            ? new Builder() : new Builder().mergeFrom(this);
      }
  
      @java.lang.Override
      protected Builder newBuilderForType(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        Builder builder = new Builder(parent);
        return builder;
      }
      /**
       * Protobuf type {@code textsecure.SenderKeyMessage}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:textsecure.SenderKeyMessage)
          org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessageOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyMessage_descriptor;
        }
  
        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyMessage_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage.class, org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage.Builder.class);
        }
  
        // Construct using org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage.newBuilder()
        private Builder() {
          maybeForceBuilderInitialization();
        }
  
        private Builder(
            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
          super(parent);
          maybeForceBuilderInitialization();
        }
        private void maybeForceBuilderInitialization() {
          if (com.google.protobuf.GeneratedMessageV3
                  .alwaysUseFieldBuilders) {
          }
        }
        @java.lang.Override
        public Builder clear() {
          super.clear();
          id_ = 0;
          bitField0_ = (bitField0_ & ~0x00000001);
          iteration_ = 0;
          bitField0_ = (bitField0_ & ~0x00000002);
          ciphertext_ = com.google.protobuf.ByteString.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000004);
          return this;
        }
  
        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor
            getDescriptorForType() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyMessage_descriptor;
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage getDefaultInstanceForType() {
          return org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage.getDefaultInstance();
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage build() {
          org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage buildPartial() {
          org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage result = new org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage(this);
          int from_bitField0_ = bitField0_;
          int to_bitField0_ = 0;
          if (((from_bitField0_ & 0x00000001) != 0)) {
            result.id_ = id_;
            to_bitField0_ |= 0x00000001;
          }
          if (((from_bitField0_ & 0x00000002) != 0)) {
            result.iteration_ = iteration_;
            to_bitField0_ |= 0x00000002;
          }
          if (((from_bitField0_ & 0x00000004) != 0)) {
            to_bitField0_ |= 0x00000004;
          }
          result.ciphertext_ = ciphertext_;
          result.bitField0_ = to_bitField0_;
          onBuilt();
          return result;
        }
  
        @java.lang.Override
        public Builder clone() {
          return super.clone();
        }
        @java.lang.Override
        public Builder setField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return super.setField(field, value);
        }
        @java.lang.Override
        public Builder clearField(
            com.google.protobuf.Descriptors.FieldDescriptor field) {
          return super.clearField(field);
        }
        @java.lang.Override
        public Builder clearOneof(
            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
          return super.clearOneof(oneof);
        }
        @java.lang.Override
        public Builder setRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            int index, java.lang.Object value) {
          return super.setRepeatedField(field, index, value);
        }
        @java.lang.Override
        public Builder addRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return super.addRepeatedField(field, value);
        }
        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage) {
            return mergeFrom((org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }
  
        public Builder mergeFrom(org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage other) {
          if (other == org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage.getDefaultInstance()) return this;
          if (other.hasId()) {
            setId(other.getId());
          }
          if (other.hasIteration()) {
            setIteration(other.getIteration());
          }
          if (other.hasCiphertext()) {
            setCiphertext(other.getCiphertext());
          }
          this.mergeUnknownFields(other.unknownFields);
          onChanged();
          return this;
        }
  
        @java.lang.Override
        public final boolean isInitialized() {
          return true;
        }
  
        @java.lang.Override
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage = (org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage) e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }
        private int bitField0_;
  
        private int id_ ;
        /**
         * <code>optional uint32 id = 1;</code>
         * @return Whether the id field is set.
         */
        @java.lang.Override
        public boolean hasId() {
          return ((bitField0_ & 0x00000001) != 0);
        }
        /**
         * <code>optional uint32 id = 1;</code>
         * @return The id.
         */
        @java.lang.Override
        public int getId() {
          return id_;
        }
        /**
         * <code>optional uint32 id = 1;</code>
         * @param value The id to set.
         * @return This builder for chaining.
         */
        public Builder setId(int value) {
          bitField0_ |= 0x00000001;
          id_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional uint32 id = 1;</code>
         * @return This builder for chaining.
         */
        public Builder clearId() {
          bitField0_ = (bitField0_ & ~0x00000001);
          id_ = 0;
          onChanged();
          return this;
        }
  
        private int iteration_ ;
        /**
         * <code>optional uint32 iteration = 2;</code>
         * @return Whether the iteration field is set.
         */
        @java.lang.Override
        public boolean hasIteration() {
          return ((bitField0_ & 0x00000002) != 0);
        }
        /**
         * <code>optional uint32 iteration = 2;</code>
         * @return The iteration.
         */
        @java.lang.Override
        public int getIteration() {
          return iteration_;
        }
        /**
         * <code>optional uint32 iteration = 2;</code>
         * @param value The iteration to set.
         * @return This builder for chaining.
         */
        public Builder setIteration(int value) {
          bitField0_ |= 0x00000002;
          iteration_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional uint32 iteration = 2;</code>
         * @return This builder for chaining.
         */
        public Builder clearIteration() {
          bitField0_ = (bitField0_ & ~0x00000002);
          iteration_ = 0;
          onChanged();
          return this;
        }
  
        private com.google.protobuf.ByteString ciphertext_ = com.google.protobuf.ByteString.EMPTY;
        /**
         * <code>optional bytes ciphertext = 3;</code>
         * @return Whether the ciphertext field is set.
         */
        @java.lang.Override
        public boolean hasCiphertext() {
          return ((bitField0_ & 0x00000004) != 0);
        }
        /**
         * <code>optional bytes ciphertext = 3;</code>
         * @return The ciphertext.
         */
        @java.lang.Override
        public com.google.protobuf.ByteString getCiphertext() {
          return ciphertext_;
        }
        /**
         * <code>optional bytes ciphertext = 3;</code>
         * @param value The ciphertext to set.
         * @return This builder for chaining.
         */
        public Builder setCiphertext(com.google.protobuf.ByteString value) {
          if (value == null) {
      throw new NullPointerException();
    }
    bitField0_ |= 0x00000004;
          ciphertext_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional bytes ciphertext = 3;</code>
         * @return This builder for chaining.
         */
        public Builder clearCiphertext() {
          bitField0_ = (bitField0_ & ~0x00000004);
          ciphertext_ = getDefaultInstance().getCiphertext();
          onChanged();
          return this;
        }
        @java.lang.Override
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFields(unknownFields);
        }
  
        @java.lang.Override
        public final Builder mergeUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.mergeUnknownFields(unknownFields);
        }
  
  
        // @@protoc_insertion_point(builder_scope:textsecure.SenderKeyMessage)
      }
  
      // @@protoc_insertion_point(class_scope:textsecure.SenderKeyMessage)
      private static final org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage DEFAULT_INSTANCE;
      static {
        DEFAULT_INSTANCE = new org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage();
      }
  
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }
  
      @java.lang.Deprecated public static final com.google.protobuf.Parser<SenderKeyMessage>
          PARSER = new com.google.protobuf.AbstractParser<SenderKeyMessage>() {
        @java.lang.Override
        public SenderKeyMessage parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new SenderKeyMessage(input, extensionRegistry);
        }
      };
  
      public static com.google.protobuf.Parser<SenderKeyMessage> parser() {
        return PARSER;
      }
  
      @java.lang.Override
      public com.google.protobuf.Parser<SenderKeyMessage> getParserForType() {
        return PARSER;
      }
  
      @java.lang.Override
      public org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyMessage getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }
  
    }
  
    public interface SenderKeyDistributionMessageOrBuilder extends
        // @@protoc_insertion_point(interface_extends:textsecure.SenderKeyDistributionMessage)
        com.google.protobuf.MessageOrBuilder {
  
      /**
       * <code>optional uint32 id = 1;</code>
       * @return Whether the id field is set.
       */
      boolean hasId();
      /**
       * <code>optional uint32 id = 1;</code>
       * @return The id.
       */
      int getId();
  
      /**
       * <code>optional uint32 iteration = 2;</code>
       * @return Whether the iteration field is set.
       */
      boolean hasIteration();
      /**
       * <code>optional uint32 iteration = 2;</code>
       * @return The iteration.
       */
      int getIteration();
  
      /**
       * <code>optional bytes chainKey = 3;</code>
       * @return Whether the chainKey field is set.
       */
      boolean hasChainKey();
      /**
       * <code>optional bytes chainKey = 3;</code>
       * @return The chainKey.
       */
      com.google.protobuf.ByteString getChainKey();
  
      /**
       * <code>optional bytes signingKey = 4;</code>
       * @return Whether the signingKey field is set.
       */
      boolean hasSigningKey();
      /**
       * <code>optional bytes signingKey = 4;</code>
       * @return The signingKey.
       */
      com.google.protobuf.ByteString getSigningKey();
    }
    /**
     * Protobuf type {@code textsecure.SenderKeyDistributionMessage}
     */
    public static final class SenderKeyDistributionMessage extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:textsecure.SenderKeyDistributionMessage)
        SenderKeyDistributionMessageOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use SenderKeyDistributionMessage.newBuilder() to construct.
      private SenderKeyDistributionMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private SenderKeyDistributionMessage() {
        chainKey_ = com.google.protobuf.ByteString.EMPTY;
        signingKey_ = com.google.protobuf.ByteString.EMPTY;
      }
  
      @java.lang.Override
      @SuppressWarnings({"unused"})
      protected java.lang.Object newInstance(
          UnusedPrivateParameter unused) {
        return new SenderKeyDistributionMessage();
      }
  
      @java.lang.Override
      public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
        return this.unknownFields;
      }
      private SenderKeyDistributionMessage(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        this();
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
            com.google.protobuf.UnknownFieldSet.newBuilder();
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 8: {
                bitField0_ |= 0x00000001;
                id_ = input.readUInt32();
                break;
              }
              case 16: {
                bitField0_ |= 0x00000002;
                iteration_ = input.readUInt32();
                break;
              }
              case 26: {
                bitField0_ |= 0x00000004;
                chainKey_ = input.readBytes();
                break;
              }
              case 34: {
                bitField0_ |= 0x00000008;
                signingKey_ = input.readBytes();
                break;
              }
              default: {
                if (!parseUnknownField(
                    input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
            }
          }
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(
              e).setUnfinishedMessage(this);
        } finally {
          this.unknownFields = unknownFields.build();
          makeExtensionsImmutable();
        }
      }
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyDistributionMessage_descriptor;
      }
  
      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyDistributionMessage_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage.class, org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage.Builder.class);
      }
  
      private int bitField0_;
      public static final int ID_FIELD_NUMBER = 1;
      private int id_;
      /**
       * <code>optional uint32 id = 1;</code>
       * @return Whether the id field is set.
       */
      @java.lang.Override
      public boolean hasId() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <code>optional uint32 id = 1;</code>
       * @return The id.
       */
      @java.lang.Override
      public int getId() {
        return id_;
      }
  
      public static final int ITERATION_FIELD_NUMBER = 2;
      private int iteration_;
      /**
       * <code>optional uint32 iteration = 2;</code>
       * @return Whether the iteration field is set.
       */
      @java.lang.Override
      public boolean hasIteration() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <code>optional uint32 iteration = 2;</code>
       * @return The iteration.
       */
      @java.lang.Override
      public int getIteration() {
        return iteration_;
      }
  
      public static final int CHAINKEY_FIELD_NUMBER = 3;
      private com.google.protobuf.ByteString chainKey_;
      /**
       * <code>optional bytes chainKey = 3;</code>
       * @return Whether the chainKey field is set.
       */
      @java.lang.Override
      public boolean hasChainKey() {
        return ((bitField0_ & 0x00000004) != 0);
      }
      /**
       * <code>optional bytes chainKey = 3;</code>
       * @return The chainKey.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getChainKey() {
        return chainKey_;
      }
  
      public static final int SIGNINGKEY_FIELD_NUMBER = 4;
      private com.google.protobuf.ByteString signingKey_;
      /**
       * <code>optional bytes signingKey = 4;</code>
       * @return Whether the signingKey field is set.
       */
      @java.lang.Override
      public boolean hasSigningKey() {
        return ((bitField0_ & 0x00000008) != 0);
      }
      /**
       * <code>optional bytes signingKey = 4;</code>
       * @return The signingKey.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getSigningKey() {
        return signingKey_;
      }
  
      private byte memoizedIsInitialized = -1;
      @java.lang.Override
      public final boolean isInitialized() {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized == 1) return true;
        if (isInitialized == 0) return false;
  
        memoizedIsInitialized = 1;
        return true;
      }
  
      @java.lang.Override
      public void writeTo(com.google.protobuf.CodedOutputStream output)
                          throws java.io.IOException {
        if (((bitField0_ & 0x00000001) != 0)) {
          output.writeUInt32(1, id_);
        }
        if (((bitField0_ & 0x00000002) != 0)) {
          output.writeUInt32(2, iteration_);
        }
        if (((bitField0_ & 0x00000004) != 0)) {
          output.writeBytes(3, chainKey_);
        }
        if (((bitField0_ & 0x00000008) != 0)) {
          output.writeBytes(4, signingKey_);
        }
        unknownFields.writeTo(output);
      }
  
      @java.lang.Override
      public int getSerializedSize() {
        int size = memoizedSize;
        if (size != -1) return size;
  
        size = 0;
        if (((bitField0_ & 0x00000001) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeUInt32Size(1, id_);
        }
        if (((bitField0_ & 0x00000002) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeUInt32Size(2, iteration_);
        }
        if (((bitField0_ & 0x00000004) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeBytesSize(3, chainKey_);
        }
        if (((bitField0_ & 0x00000008) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeBytesSize(4, signingKey_);
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
      }
  
      @java.lang.Override
      public boolean equals(final java.lang.Object obj) {
        if (obj == this) {
         return true;
        }
        if (!(obj instanceof org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage)) {
          return super.equals(obj);
        }
        org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage other = (org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage) obj;
  
        if (hasId() != other.hasId()) return false;
        if (hasId()) {
          if (getId()
              != other.getId()) return false;
        }
        if (hasIteration() != other.hasIteration()) return false;
        if (hasIteration()) {
          if (getIteration()
              != other.getIteration()) return false;
        }
        if (hasChainKey() != other.hasChainKey()) return false;
        if (hasChainKey()) {
          if (!getChainKey()
              .equals(other.getChainKey())) return false;
        }
        if (hasSigningKey() != other.hasSigningKey()) return false;
        if (hasSigningKey()) {
          if (!getSigningKey()
              .equals(other.getSigningKey())) return false;
        }
        if (!unknownFields.equals(other.unknownFields)) return false;
        return true;
      }
  
      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        if (hasId()) {
          hash = (37 * hash) + ID_FIELD_NUMBER;
          hash = (53 * hash) + getId();
        }
        if (hasIteration()) {
          hash = (37 * hash) + ITERATION_FIELD_NUMBER;
          hash = (53 * hash) + getIteration();
        }
        if (hasChainKey()) {
          hash = (37 * hash) + CHAINKEY_FIELD_NUMBER;
          hash = (53 * hash) + getChainKey().hashCode();
        }
        if (hasSigningKey()) {
          hash = (37 * hash) + SIGNINGKEY_FIELD_NUMBER;
          hash = (53 * hash) + getSigningKey().hashCode();
        }
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }
  
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage 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.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
  
      @java.lang.Override
      public Builder newBuilderForType() { return newBuilder(); }
      public static Builder newBuilder() {
        return DEFAULT_INSTANCE.toBuilder();
      }
      public static Builder newBuilder(org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
      }
      @java.lang.Override
      public Builder toBuilder() {
        return this == DEFAULT_INSTANCE
            ? new Builder() : new Builder().mergeFrom(this);
      }
  
      @java.lang.Override
      protected Builder newBuilderForType(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        Builder builder = new Builder(parent);
        return builder;
      }
      /**
       * Protobuf type {@code textsecure.SenderKeyDistributionMessage}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:textsecure.SenderKeyDistributionMessage)
          org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessageOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyDistributionMessage_descriptor;
        }
  
        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyDistributionMessage_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage.class, org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage.Builder.class);
        }
  
        // Construct using org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage.newBuilder()
        private Builder() {
          maybeForceBuilderInitialization();
        }
  
        private Builder(
            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
          super(parent);
          maybeForceBuilderInitialization();
        }
        private void maybeForceBuilderInitialization() {
          if (com.google.protobuf.GeneratedMessageV3
                  .alwaysUseFieldBuilders) {
          }
        }
        @java.lang.Override
        public Builder clear() {
          super.clear();
          id_ = 0;
          bitField0_ = (bitField0_ & ~0x00000001);
          iteration_ = 0;
          bitField0_ = (bitField0_ & ~0x00000002);
          chainKey_ = com.google.protobuf.ByteString.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000004);
          signingKey_ = com.google.protobuf.ByteString.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000008);
          return this;
        }
  
        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor
            getDescriptorForType() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyDistributionMessage_descriptor;
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage getDefaultInstanceForType() {
          return org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage.getDefaultInstance();
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage build() {
          org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage buildPartial() {
          org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage result = new org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage(this);
          int from_bitField0_ = bitField0_;
          int to_bitField0_ = 0;
          if (((from_bitField0_ & 0x00000001) != 0)) {
            result.id_ = id_;
            to_bitField0_ |= 0x00000001;
          }
          if (((from_bitField0_ & 0x00000002) != 0)) {
            result.iteration_ = iteration_;
            to_bitField0_ |= 0x00000002;
          }
          if (((from_bitField0_ & 0x00000004) != 0)) {
            to_bitField0_ |= 0x00000004;
          }
          result.chainKey_ = chainKey_;
          if (((from_bitField0_ & 0x00000008) != 0)) {
            to_bitField0_ |= 0x00000008;
          }
          result.signingKey_ = signingKey_;
          result.bitField0_ = to_bitField0_;
          onBuilt();
          return result;
        }
  
        @java.lang.Override
        public Builder clone() {
          return super.clone();
        }
        @java.lang.Override
        public Builder setField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return super.setField(field, value);
        }
        @java.lang.Override
        public Builder clearField(
            com.google.protobuf.Descriptors.FieldDescriptor field) {
          return super.clearField(field);
        }
        @java.lang.Override
        public Builder clearOneof(
            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
          return super.clearOneof(oneof);
        }
        @java.lang.Override
        public Builder setRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            int index, java.lang.Object value) {
          return super.setRepeatedField(field, index, value);
        }
        @java.lang.Override
        public Builder addRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return super.addRepeatedField(field, value);
        }
        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage) {
            return mergeFrom((org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }
  
        public Builder mergeFrom(org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage other) {
          if (other == org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage.getDefaultInstance()) return this;
          if (other.hasId()) {
            setId(other.getId());
          }
          if (other.hasIteration()) {
            setIteration(other.getIteration());
          }
          if (other.hasChainKey()) {
            setChainKey(other.getChainKey());
          }
          if (other.hasSigningKey()) {
            setSigningKey(other.getSigningKey());
          }
          this.mergeUnknownFields(other.unknownFields);
          onChanged();
          return this;
        }
  
        @java.lang.Override
        public final boolean isInitialized() {
          return true;
        }
  
        @java.lang.Override
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage = (org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage) e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }
        private int bitField0_;
  
        private int id_ ;
        /**
         * <code>optional uint32 id = 1;</code>
         * @return Whether the id field is set.
         */
        @java.lang.Override
        public boolean hasId() {
          return ((bitField0_ & 0x00000001) != 0);
        }
        /**
         * <code>optional uint32 id = 1;</code>
         * @return The id.
         */
        @java.lang.Override
        public int getId() {
          return id_;
        }
        /**
         * <code>optional uint32 id = 1;</code>
         * @param value The id to set.
         * @return This builder for chaining.
         */
        public Builder setId(int value) {
          bitField0_ |= 0x00000001;
          id_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional uint32 id = 1;</code>
         * @return This builder for chaining.
         */
        public Builder clearId() {
          bitField0_ = (bitField0_ & ~0x00000001);
          id_ = 0;
          onChanged();
          return this;
        }
  
        private int iteration_ ;
        /**
         * <code>optional uint32 iteration = 2;</code>
         * @return Whether the iteration field is set.
         */
        @java.lang.Override
        public boolean hasIteration() {
          return ((bitField0_ & 0x00000002) != 0);
        }
        /**
         * <code>optional uint32 iteration = 2;</code>
         * @return The iteration.
         */
        @java.lang.Override
        public int getIteration() {
          return iteration_;
        }
        /**
         * <code>optional uint32 iteration = 2;</code>
         * @param value The iteration to set.
         * @return This builder for chaining.
         */
        public Builder setIteration(int value) {
          bitField0_ |= 0x00000002;
          iteration_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional uint32 iteration = 2;</code>
         * @return This builder for chaining.
         */
        public Builder clearIteration() {
          bitField0_ = (bitField0_ & ~0x00000002);
          iteration_ = 0;
          onChanged();
          return this;
        }
  
        private com.google.protobuf.ByteString chainKey_ = com.google.protobuf.ByteString.EMPTY;
        /**
         * <code>optional bytes chainKey = 3;</code>
         * @return Whether the chainKey field is set.
         */
        @java.lang.Override
        public boolean hasChainKey() {
          return ((bitField0_ & 0x00000004) != 0);
        }
        /**
         * <code>optional bytes chainKey = 3;</code>
         * @return The chainKey.
         */
        @java.lang.Override
        public com.google.protobuf.ByteString getChainKey() {
          return chainKey_;
        }
        /**
         * <code>optional bytes chainKey = 3;</code>
         * @param value The chainKey to set.
         * @return This builder for chaining.
         */
        public Builder setChainKey(com.google.protobuf.ByteString value) {
          if (value == null) {
      throw new NullPointerException();
    }
    bitField0_ |= 0x00000004;
          chainKey_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional bytes chainKey = 3;</code>
         * @return This builder for chaining.
         */
        public Builder clearChainKey() {
          bitField0_ = (bitField0_ & ~0x00000004);
          chainKey_ = getDefaultInstance().getChainKey();
          onChanged();
          return this;
        }
  
        private com.google.protobuf.ByteString signingKey_ = com.google.protobuf.ByteString.EMPTY;
        /**
         * <code>optional bytes signingKey = 4;</code>
         * @return Whether the signingKey field is set.
         */
        @java.lang.Override
        public boolean hasSigningKey() {
          return ((bitField0_ & 0x00000008) != 0);
        }
        /**
         * <code>optional bytes signingKey = 4;</code>
         * @return The signingKey.
         */
        @java.lang.Override
        public com.google.protobuf.ByteString getSigningKey() {
          return signingKey_;
        }
        /**
         * <code>optional bytes signingKey = 4;</code>
         * @param value The signingKey to set.
         * @return This builder for chaining.
         */
        public Builder setSigningKey(com.google.protobuf.ByteString value) {
          if (value == null) {
      throw new NullPointerException();
    }
    bitField0_ |= 0x00000008;
          signingKey_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional bytes signingKey = 4;</code>
         * @return This builder for chaining.
         */
        public Builder clearSigningKey() {
          bitField0_ = (bitField0_ & ~0x00000008);
          signingKey_ = getDefaultInstance().getSigningKey();
          onChanged();
          return this;
        }
        @java.lang.Override
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFields(unknownFields);
        }
  
        @java.lang.Override
        public final Builder mergeUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.mergeUnknownFields(unknownFields);
        }
  
  
        // @@protoc_insertion_point(builder_scope:textsecure.SenderKeyDistributionMessage)
      }
  
      // @@protoc_insertion_point(class_scope:textsecure.SenderKeyDistributionMessage)
      private static final org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage DEFAULT_INSTANCE;
      static {
        DEFAULT_INSTANCE = new org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage();
      }
  
      public static org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }
  
      @java.lang.Deprecated public static final com.google.protobuf.Parser<SenderKeyDistributionMessage>
          PARSER = new com.google.protobuf.AbstractParser<SenderKeyDistributionMessage>() {
        @java.lang.Override
        public SenderKeyDistributionMessage parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new SenderKeyDistributionMessage(input, extensionRegistry);
        }
      };
  
      public static com.google.protobuf.Parser<SenderKeyDistributionMessage> parser() {
        return PARSER;
      }
  
      @java.lang.Override
      public com.google.protobuf.Parser<SenderKeyDistributionMessage> getParserForType() {
        return PARSER;
      }
  
      @java.lang.Override
      public org.whispersystems.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }
  
    }
  
    public interface DeviceConsistencyCodeMessageOrBuilder extends
        // @@protoc_insertion_point(interface_extends:textsecure.DeviceConsistencyCodeMessage)
        com.google.protobuf.MessageOrBuilder {
  
      /**
       * <code>optional uint32 generation = 1;</code>
       * @return Whether the generation field is set.
       */
      boolean hasGeneration();
      /**
       * <code>optional uint32 generation = 1;</code>
       * @return The generation.
       */
      int getGeneration();
  
      /**
       * <code>optional bytes signature = 2;</code>
       * @return Whether the signature field is set.
       */
      boolean hasSignature();
      /**
       * <code>optional bytes signature = 2;</code>
       * @return The signature.
       */
      com.google.protobuf.ByteString getSignature();
    }
    /**
     * Protobuf type {@code textsecure.DeviceConsistencyCodeMessage}
     */
    public static final class DeviceConsistencyCodeMessage extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:textsecure.DeviceConsistencyCodeMessage)
        DeviceConsistencyCodeMessageOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use DeviceConsistencyCodeMessage.newBuilder() to construct.
      private DeviceConsistencyCodeMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private DeviceConsistencyCodeMessage() {
        signature_ = com.google.protobuf.ByteString.EMPTY;
      }
  
      @java.lang.Override
      @SuppressWarnings({"unused"})
      protected java.lang.Object newInstance(
          UnusedPrivateParameter unused) {
        return new DeviceConsistencyCodeMessage();
      }
  
      @java.lang.Override
      public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
        return this.unknownFields;
      }
      private DeviceConsistencyCodeMessage(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        this();
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
            com.google.protobuf.UnknownFieldSet.newBuilder();
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 8: {
                bitField0_ |= 0x00000001;
                generation_ = input.readUInt32();
                break;
              }
              case 18: {
                bitField0_ |= 0x00000002;
                signature_ = input.readBytes();
                break;
              }
              default: {
                if (!parseUnknownField(
                    input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
            }
          }
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(
              e).setUnfinishedMessage(this);
        } finally {
          this.unknownFields = unknownFields.build();
          makeExtensionsImmutable();
        }
      }
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_DeviceConsistencyCodeMessage_descriptor;
      }
  
      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_DeviceConsistencyCodeMessage_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage.class, org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage.Builder.class);
      }
  
      private int bitField0_;
      public static final int GENERATION_FIELD_NUMBER = 1;
      private int generation_;
      /**
       * <code>optional uint32 generation = 1;</code>
       * @return Whether the generation field is set.
       */
      @java.lang.Override
      public boolean hasGeneration() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <code>optional uint32 generation = 1;</code>
       * @return The generation.
       */
      @java.lang.Override
      public int getGeneration() {
        return generation_;
      }
  
      public static final int SIGNATURE_FIELD_NUMBER = 2;
      private com.google.protobuf.ByteString signature_;
      /**
       * <code>optional bytes signature = 2;</code>
       * @return Whether the signature field is set.
       */
      @java.lang.Override
      public boolean hasSignature() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <code>optional bytes signature = 2;</code>
       * @return The signature.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getSignature() {
        return signature_;
      }
  
      private byte memoizedIsInitialized = -1;
      @java.lang.Override
      public final boolean isInitialized() {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized == 1) return true;
        if (isInitialized == 0) return false;
  
        memoizedIsInitialized = 1;
        return true;
      }
  
      @java.lang.Override
      public void writeTo(com.google.protobuf.CodedOutputStream output)
                          throws java.io.IOException {
        if (((bitField0_ & 0x00000001) != 0)) {
          output.writeUInt32(1, generation_);
        }
        if (((bitField0_ & 0x00000002) != 0)) {
          output.writeBytes(2, signature_);
        }
        unknownFields.writeTo(output);
      }
  
      @java.lang.Override
      public int getSerializedSize() {
        int size = memoizedSize;
        if (size != -1) return size;
  
        size = 0;
        if (((bitField0_ & 0x00000001) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeUInt32Size(1, generation_);
        }
        if (((bitField0_ & 0x00000002) != 0)) {
          size += com.google.protobuf.CodedOutputStream
            .computeBytesSize(2, signature_);
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
      }
  
      @java.lang.Override
      public boolean equals(final java.lang.Object obj) {
        if (obj == this) {
         return true;
        }
        if (!(obj instanceof org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage)) {
          return super.equals(obj);
        }
        org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage other = (org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage) obj;
  
        if (hasGeneration() != other.hasGeneration()) return false;
        if (hasGeneration()) {
          if (getGeneration()
              != other.getGeneration()) return false;
        }
        if (hasSignature() != other.hasSignature()) return false;
        if (hasSignature()) {
          if (!getSignature()
              .equals(other.getSignature())) return false;
        }
        if (!unknownFields.equals(other.unknownFields)) return false;
        return true;
      }
  
      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        if (hasGeneration()) {
          hash = (37 * hash) + GENERATION_FIELD_NUMBER;
          hash = (53 * hash) + getGeneration();
        }
        if (hasSignature()) {
          hash = (37 * hash) + SIGNATURE_FIELD_NUMBER;
          hash = (53 * hash) + getSignature().hashCode();
        }
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }
  
      public static org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage 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.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
  
      @java.lang.Override
      public Builder newBuilderForType() { return newBuilder(); }
      public static Builder newBuilder() {
        return DEFAULT_INSTANCE.toBuilder();
      }
      public static Builder newBuilder(org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
      }
      @java.lang.Override
      public Builder toBuilder() {
        return this == DEFAULT_INSTANCE
            ? new Builder() : new Builder().mergeFrom(this);
      }
  
      @java.lang.Override
      protected Builder newBuilderForType(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        Builder builder = new Builder(parent);
        return builder;
      }
      /**
       * Protobuf type {@code textsecure.DeviceConsistencyCodeMessage}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:textsecure.DeviceConsistencyCodeMessage)
          org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessageOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_DeviceConsistencyCodeMessage_descriptor;
        }
  
        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_DeviceConsistencyCodeMessage_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage.class, org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage.Builder.class);
        }
  
        // Construct using org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage.newBuilder()
        private Builder() {
          maybeForceBuilderInitialization();
        }
  
        private Builder(
            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
          super(parent);
          maybeForceBuilderInitialization();
        }
        private void maybeForceBuilderInitialization() {
          if (com.google.protobuf.GeneratedMessageV3
                  .alwaysUseFieldBuilders) {
          }
        }
        @java.lang.Override
        public Builder clear() {
          super.clear();
          generation_ = 0;
          bitField0_ = (bitField0_ & ~0x00000001);
          signature_ = com.google.protobuf.ByteString.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000002);
          return this;
        }
  
        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor
            getDescriptorForType() {
          return org.whispersystems.libsignal.protocol.SignalProtos.internal_static_textsecure_DeviceConsistencyCodeMessage_descriptor;
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage getDefaultInstanceForType() {
          return org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage.getDefaultInstance();
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage build() {
          org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }
  
        @java.lang.Override
        public org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage buildPartial() {
          org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage result = new org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage(this);
          int from_bitField0_ = bitField0_;
          int to_bitField0_ = 0;
          if (((from_bitField0_ & 0x00000001) != 0)) {
            result.generation_ = generation_;
            to_bitField0_ |= 0x00000001;
          }
          if (((from_bitField0_ & 0x00000002) != 0)) {
            to_bitField0_ |= 0x00000002;
          }
          result.signature_ = signature_;
          result.bitField0_ = to_bitField0_;
          onBuilt();
          return result;
        }
  
        @java.lang.Override
        public Builder clone() {
          return super.clone();
        }
        @java.lang.Override
        public Builder setField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return super.setField(field, value);
        }
        @java.lang.Override
        public Builder clearField(
            com.google.protobuf.Descriptors.FieldDescriptor field) {
          return super.clearField(field);
        }
        @java.lang.Override
        public Builder clearOneof(
            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
          return super.clearOneof(oneof);
        }
        @java.lang.Override
        public Builder setRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            int index, java.lang.Object value) {
          return super.setRepeatedField(field, index, value);
        }
        @java.lang.Override
        public Builder addRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return super.addRepeatedField(field, value);
        }
        @java.lang.Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage) {
            return mergeFrom((org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }
  
        public Builder mergeFrom(org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage other) {
          if (other == org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage.getDefaultInstance()) return this;
          if (other.hasGeneration()) {
            setGeneration(other.getGeneration());
          }
          if (other.hasSignature()) {
            setSignature(other.getSignature());
          }
          this.mergeUnknownFields(other.unknownFields);
          onChanged();
          return this;
        }
  
        @java.lang.Override
        public final boolean isInitialized() {
          return true;
        }
  
        @java.lang.Override
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage = (org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage) e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }
        private int bitField0_;
  
        private int generation_ ;
        /**
         * <code>optional uint32 generation = 1;</code>
         * @return Whether the generation field is set.
         */
        @java.lang.Override
        public boolean hasGeneration() {
          return ((bitField0_ & 0x00000001) != 0);
        }
        /**
         * <code>optional uint32 generation = 1;</code>
         * @return The generation.
         */
        @java.lang.Override
        public int getGeneration() {
          return generation_;
        }
        /**
         * <code>optional uint32 generation = 1;</code>
         * @param value The generation to set.
         * @return This builder for chaining.
         */
        public Builder setGeneration(int value) {
          bitField0_ |= 0x00000001;
          generation_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional uint32 generation = 1;</code>
         * @return This builder for chaining.
         */
        public Builder clearGeneration() {
          bitField0_ = (bitField0_ & ~0x00000001);
          generation_ = 0;
          onChanged();
          return this;
        }
  
        private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY;
        /**
         * <code>optional bytes signature = 2;</code>
         * @return Whether the signature field is set.
         */
        @java.lang.Override
        public boolean hasSignature() {
          return ((bitField0_ & 0x00000002) != 0);
        }
        /**
         * <code>optional bytes signature = 2;</code>
         * @return The signature.
         */
        @java.lang.Override
        public com.google.protobuf.ByteString getSignature() {
          return signature_;
        }
        /**
         * <code>optional bytes signature = 2;</code>
         * @param value The signature to set.
         * @return This builder for chaining.
         */
        public Builder setSignature(com.google.protobuf.ByteString value) {
          if (value == null) {
      throw new NullPointerException();
    }
    bitField0_ |= 0x00000002;
          signature_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>optional bytes signature = 2;</code>
         * @return This builder for chaining.
         */
        public Builder clearSignature() {
          bitField0_ = (bitField0_ & ~0x00000002);
          signature_ = getDefaultInstance().getSignature();
          onChanged();
          return this;
        }
        @java.lang.Override
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFields(unknownFields);
        }
  
        @java.lang.Override
        public final Builder mergeUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.mergeUnknownFields(unknownFields);
        }
  
  
        // @@protoc_insertion_point(builder_scope:textsecure.DeviceConsistencyCodeMessage)
      }
  
      // @@protoc_insertion_point(class_scope:textsecure.DeviceConsistencyCodeMessage)
      private static final org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage DEFAULT_INSTANCE;
      static {
        DEFAULT_INSTANCE = new org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage();
      }
  
      public static org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }
  
      @java.lang.Deprecated public static final com.google.protobuf.Parser<DeviceConsistencyCodeMessage>
          PARSER = new com.google.protobuf.AbstractParser<DeviceConsistencyCodeMessage>() {
        @java.lang.Override
        public DeviceConsistencyCodeMessage parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new DeviceConsistencyCodeMessage(input, extensionRegistry);
        }
      };
  
      public static com.google.protobuf.Parser<DeviceConsistencyCodeMessage> parser() {
        return PARSER;
      }
  
      @java.lang.Override
      public com.google.protobuf.Parser<DeviceConsistencyCodeMessage> getParserForType() {
        return PARSER;
      }
  
      @java.lang.Override
      public org.whispersystems.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }
  
    }
  
    private static final com.google.protobuf.Descriptors.Descriptor
      internal_static_textsecure_SignalMessage_descriptor;
    private static final 
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internal_static_textsecure_SignalMessage_fieldAccessorTable;
    private static final com.google.protobuf.Descriptors.Descriptor
      internal_static_textsecure_PreKeySignalMessage_descriptor;
    private static final 
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internal_static_textsecure_PreKeySignalMessage_fieldAccessorTable;
    private static final com.google.protobuf.Descriptors.Descriptor
      internal_static_textsecure_KeyExchangeMessage_descriptor;
    private static final 
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internal_static_textsecure_KeyExchangeMessage_fieldAccessorTable;
    private static final com.google.protobuf.Descriptors.Descriptor
      internal_static_textsecure_SenderKeyMessage_descriptor;
    private static final 
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internal_static_textsecure_SenderKeyMessage_fieldAccessorTable;
    private static final com.google.protobuf.Descriptors.Descriptor
      internal_static_textsecure_SenderKeyDistributionMessage_descriptor;
    private static final 
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internal_static_textsecure_SenderKeyDistributionMessage_fieldAccessorTable;
    private static final com.google.protobuf.Descriptors.Descriptor
      internal_static_textsecure_DeviceConsistencyCodeMessage_descriptor;
    private static final 
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internal_static_textsecure_DeviceConsistencyCodeMessage_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\031WhisperTextProtocol.proto\022\ntextsecure\"" +
        "a\n\rSignalMessage\022\022\n\nratchetKey\030\001 \001(\014\022\017\n\007" +
        "counter\030\002 \001(\r\022\027\n\017previousCounter\030\003 \001(\r\022\022" +
        "\n\nciphertext\030\004 \001(\014\"\216\001\n\023PreKeySignalMessa" +
        "ge\022\026\n\016registrationId\030\005 \001(\r\022\020\n\010preKeyId\030\001" +
        " \001(\r\022\026\n\016signedPreKeyId\030\006 \001(\r\022\017\n\007baseKey\030" +
        "\002 \001(\014\022\023\n\013identityKey\030\003 \001(\014\022\017\n\007message\030\004 " +
        "\001(\014\"t\n\022KeyExchangeMessage\022\n\n\002id\030\001 \001(\r\022\017\n" +
        "\007baseKey\030\002 \001(\014\022\022\n\nratchetKey\030\003 \001(\014\022\023\n\013id" +
        "entityKey\030\004 \001(\014\022\030\n\020baseKeySignature\030\005 \001(" +
        "\014\"E\n\020SenderKeyMessage\022\n\n\002id\030\001 \001(\r\022\021\n\tite" +
        "ration\030\002 \001(\r\022\022\n\nciphertext\030\003 \001(\014\"c\n\034Send" +
        "erKeyDistributionMessage\022\n\n\002id\030\001 \001(\r\022\021\n\t" +
        "iteration\030\002 \001(\r\022\020\n\010chainKey\030\003 \001(\014\022\022\n\nsig" +
        "ningKey\030\004 \001(\014\"E\n\034DeviceConsistencyCodeMe" +
        "ssage\022\022\n\ngeneration\030\001 \001(\r\022\021\n\tsignature\030\002" +
        " \001(\014B5\n%org.whispersystems.libsignal.pro" +
        "tocolB\014SignalProtos"
      };
      descriptor = com.google.protobuf.Descriptors.FileDescriptor
        .internalBuildGeneratedFileFrom(descriptorData,
          new com.google.protobuf.Descriptors.FileDescriptor[] {
          });
      internal_static_textsecure_SignalMessage_descriptor =
        getDescriptor().getMessageTypes().get(0);
      internal_static_textsecure_SignalMessage_fieldAccessorTable = new
        com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
          internal_static_textsecure_SignalMessage_descriptor,
          new java.lang.String[] { "RatchetKey", "Counter", "PreviousCounter", "Ciphertext", });
      internal_static_textsecure_PreKeySignalMessage_descriptor =
        getDescriptor().getMessageTypes().get(1);
      internal_static_textsecure_PreKeySignalMessage_fieldAccessorTable = new
        com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
          internal_static_textsecure_PreKeySignalMessage_descriptor,
          new java.lang.String[] { "RegistrationId", "PreKeyId", "SignedPreKeyId", "BaseKey", "IdentityKey", "Message", });
      internal_static_textsecure_KeyExchangeMessage_descriptor =
        getDescriptor().getMessageTypes().get(2);
      internal_static_textsecure_KeyExchangeMessage_fieldAccessorTable = new
        com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
          internal_static_textsecure_KeyExchangeMessage_descriptor,
          new java.lang.String[] { "Id", "BaseKey", "RatchetKey", "IdentityKey", "BaseKeySignature", });
      internal_static_textsecure_SenderKeyMessage_descriptor =
        getDescriptor().getMessageTypes().get(3);
      internal_static_textsecure_SenderKeyMessage_fieldAccessorTable = new
        com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
          internal_static_textsecure_SenderKeyMessage_descriptor,
          new java.lang.String[] { "Id", "Iteration", "Ciphertext", });
      internal_static_textsecure_SenderKeyDistributionMessage_descriptor =
        getDescriptor().getMessageTypes().get(4);
      internal_static_textsecure_SenderKeyDistributionMessage_fieldAccessorTable = new
        com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
          internal_static_textsecure_SenderKeyDistributionMessage_descriptor,
          new java.lang.String[] { "Id", "Iteration", "ChainKey", "SigningKey", });
      internal_static_textsecure_DeviceConsistencyCodeMessage_descriptor =
        getDescriptor().getMessageTypes().get(5);
      internal_static_textsecure_DeviceConsistencyCodeMessage_fieldAccessorTable = new
        com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
          internal_static_textsecure_DeviceConsistencyCodeMessage_descriptor,
          new java.lang.String[] { "Generation", "Signature", });
    }
  
    // @@protoc_insertion_point(outer_class_scope)
  }
  