+ * Sessions are built from one of three different possible vectors: + *
optional bytes content = 1;
+ *
+ * + * optional bytes identifier = 2; + *+ */ + boolean hasContent(); + /** + *
optional bytes content = 1;
+ *
+ * + * optional bytes identifier = 2; + *+ */ + com.google.protobuf.ByteString getContent(); + } + /** + * Protobuf type {@code textsecure.LogicalFingerprint} + */ + public static final class LogicalFingerprint extends + com.google.protobuf.GeneratedMessage + implements LogicalFingerprintOrBuilder { + // Use LogicalFingerprint.newBuilder() to construct. + private LogicalFingerprint(com.google.protobuf.GeneratedMessage.Builder> builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private LogicalFingerprint(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final LogicalFingerprint defaultInstance; + public static LogicalFingerprint getDefaultInstance() { + return defaultInstance; + } + + public LogicalFingerprint getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LogicalFingerprint( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + content_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.session.libsignal.libsignal.fingerprint.FingerprintProtos.internal_static_textsecure_LogicalFingerprint_descriptor; + } + + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return org.session.libsignal.libsignal.fingerprint.FingerprintProtos.internal_static_textsecure_LogicalFingerprint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.class, org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.Builder.class); + } + + public static com.google.protobuf.Parser
optional bytes content = 1;
+ *
+ * + * optional bytes identifier = 2; + *+ */ + public boolean hasContent() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + *
optional bytes content = 1;
+ *
+ * + * optional bytes identifier = 2; + *+ */ + public com.google.protobuf.ByteString getContent() { + return content_; + } + + private void initFields() { + content_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, content_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, content_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @Override + protected Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code textsecure.LogicalFingerprint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder
optional bytes content = 1;
+ *
+ * + * optional bytes identifier = 2; + *+ */ + public boolean hasContent() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + *
optional bytes content = 1;
+ *
+ * + * optional bytes identifier = 2; + *+ */ + public com.google.protobuf.ByteString getContent() { + return content_; + } + /** + *
optional bytes content = 1;
+ *
+ * + * optional bytes identifier = 2; + *+ */ + public Builder setContent(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + content_ = value; + onChanged(); + return this; + } + /** + *
optional bytes content = 1;
+ *
+ * + * optional bytes identifier = 2; + *+ */ + public Builder clearContent() { + bitField0_ = (bitField0_ & ~0x00000001); + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:textsecure.LogicalFingerprint) + } + + static { + defaultInstance = new LogicalFingerprint(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:textsecure.LogicalFingerprint) + } + + public interface CombinedFingerprintsOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional uint32 version = 1; + /** + *
optional uint32 version = 1;
+ */
+ boolean hasVersion();
+ /**
+ * optional uint32 version = 1;
+ */
+ int getVersion();
+
+ // optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ /**
+ * optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ */
+ boolean hasLocalFingerprint();
+ /**
+ * optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ */
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint getLocalFingerprint();
+ /**
+ * optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ */
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprintOrBuilder getLocalFingerprintOrBuilder();
+
+ // optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ /**
+ * optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ */
+ boolean hasRemoteFingerprint();
+ /**
+ * optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ */
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint getRemoteFingerprint();
+ /**
+ * optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ */
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprintOrBuilder getRemoteFingerprintOrBuilder();
+ }
+ /**
+ * Protobuf type {@code textsecure.CombinedFingerprints}
+ */
+ public static final class CombinedFingerprints extends
+ com.google.protobuf.GeneratedMessage
+ implements CombinedFingerprintsOrBuilder {
+ // Use CombinedFingerprints.newBuilder() to construct.
+ private CombinedFingerprints(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private CombinedFingerprints(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final CombinedFingerprints defaultInstance;
+ public static CombinedFingerprints getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public CombinedFingerprints getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private CombinedFingerprints(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ version_ = input.readUInt32();
+ break;
+ }
+ case 18: {
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ subBuilder = localFingerprint_.toBuilder();
+ }
+ localFingerprint_ = input.readMessage(org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(localFingerprint_);
+ localFingerprint_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000002;
+ break;
+ }
+ case 26: {
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ subBuilder = remoteFingerprint_.toBuilder();
+ }
+ remoteFingerprint_ = input.readMessage(org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(remoteFingerprint_);
+ remoteFingerprint_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000004;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.fingerprint.FingerprintProtos.internal_static_textsecure_CombinedFingerprints_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.fingerprint.FingerprintProtos.internal_static_textsecure_CombinedFingerprints_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.CombinedFingerprints.class, org.session.libsignal.libsignal.fingerprint.FingerprintProtos.CombinedFingerprints.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional uint32 version = 1;
+ */
+ public boolean hasVersion() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 version = 1;
+ */
+ public int getVersion() {
+ return version_;
+ }
+
+ // optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ public static final int LOCALFINGERPRINT_FIELD_NUMBER = 2;
+ private org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint localFingerprint_;
+ /**
+ * optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ */
+ public boolean hasLocalFingerprint() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ */
+ public org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint getLocalFingerprint() {
+ return localFingerprint_;
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ */
+ public org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprintOrBuilder getLocalFingerprintOrBuilder() {
+ return localFingerprint_;
+ }
+
+ // optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ public static final int REMOTEFINGERPRINT_FIELD_NUMBER = 3;
+ private org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint remoteFingerprint_;
+ /**
+ * optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ */
+ public boolean hasRemoteFingerprint() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ */
+ public org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint getRemoteFingerprint() {
+ return remoteFingerprint_;
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ */
+ public org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprintOrBuilder getRemoteFingerprintOrBuilder() {
+ return remoteFingerprint_;
+ }
+
+ private void initFields() {
+ version_ = 0;
+ localFingerprint_ = org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.getDefaultInstance();
+ remoteFingerprint_ = org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.getDefaultInstance();
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeUInt32(1, version_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeMessage(2, localFingerprint_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeMessage(3, remoteFingerprint_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, version_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, localFingerprint_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, remoteFingerprint_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.CombinedFingerprints parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.CombinedFingerprints parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.CombinedFingerprints parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.CombinedFingerprints parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.CombinedFingerprints parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.CombinedFingerprints parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.CombinedFingerprints parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.CombinedFingerprints parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.CombinedFingerprints parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.fingerprint.FingerprintProtos.CombinedFingerprints parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.fingerprint.FingerprintProtos.CombinedFingerprints prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.CombinedFingerprints}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional uint32 version = 1;
+ */
+ public boolean hasVersion() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 version = 1;
+ */
+ public int getVersion() {
+ return version_;
+ }
+ /**
+ * optional uint32 version = 1;
+ */
+ public Builder setVersion(int value) {
+ bitField0_ |= 0x00000001;
+ version_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 version = 1;
+ */
+ public Builder clearVersion() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ version_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ private org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint localFingerprint_ = org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.getDefaultInstance();
+ private com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint, org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.Builder, org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprintOrBuilder> localFingerprintBuilder_;
+ /**
+ * optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ */
+ public boolean hasLocalFingerprint() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ */
+ public org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint getLocalFingerprint() {
+ if (localFingerprintBuilder_ == null) {
+ return localFingerprint_;
+ } else {
+ return localFingerprintBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ */
+ public Builder setLocalFingerprint(org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint value) {
+ if (localFingerprintBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ localFingerprint_ = value;
+ onChanged();
+ } else {
+ localFingerprintBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ */
+ public Builder setLocalFingerprint(
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.Builder builderForValue) {
+ if (localFingerprintBuilder_ == null) {
+ localFingerprint_ = builderForValue.build();
+ onChanged();
+ } else {
+ localFingerprintBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ */
+ public Builder mergeLocalFingerprint(org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint value) {
+ if (localFingerprintBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) == 0x00000002) &&
+ localFingerprint_ != org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.getDefaultInstance()) {
+ localFingerprint_ =
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.newBuilder(localFingerprint_).mergeFrom(value).buildPartial();
+ } else {
+ localFingerprint_ = value;
+ }
+ onChanged();
+ } else {
+ localFingerprintBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ */
+ public Builder clearLocalFingerprint() {
+ if (localFingerprintBuilder_ == null) {
+ localFingerprint_ = org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.getDefaultInstance();
+ onChanged();
+ } else {
+ localFingerprintBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ */
+ public org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.Builder getLocalFingerprintBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getLocalFingerprintFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ */
+ public org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprintOrBuilder getLocalFingerprintOrBuilder() {
+ if (localFingerprintBuilder_ != null) {
+ return localFingerprintBuilder_.getMessageOrBuilder();
+ } else {
+ return localFingerprint_;
+ }
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint localFingerprint = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint, org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.Builder, org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprintOrBuilder>
+ getLocalFingerprintFieldBuilder() {
+ if (localFingerprintBuilder_ == null) {
+ localFingerprintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint, org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.Builder, org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprintOrBuilder>(
+ localFingerprint_,
+ getParentForChildren(),
+ isClean());
+ localFingerprint_ = null;
+ }
+ return localFingerprintBuilder_;
+ }
+
+ // optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ private org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint remoteFingerprint_ = org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.getDefaultInstance();
+ private com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint, org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.Builder, org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprintOrBuilder> remoteFingerprintBuilder_;
+ /**
+ * optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ */
+ public boolean hasRemoteFingerprint() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ */
+ public org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint getRemoteFingerprint() {
+ if (remoteFingerprintBuilder_ == null) {
+ return remoteFingerprint_;
+ } else {
+ return remoteFingerprintBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ */
+ public Builder setRemoteFingerprint(org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint value) {
+ if (remoteFingerprintBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ remoteFingerprint_ = value;
+ onChanged();
+ } else {
+ remoteFingerprintBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000004;
+ return this;
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ */
+ public Builder setRemoteFingerprint(
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.Builder builderForValue) {
+ if (remoteFingerprintBuilder_ == null) {
+ remoteFingerprint_ = builderForValue.build();
+ onChanged();
+ } else {
+ remoteFingerprintBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000004;
+ return this;
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ */
+ public Builder mergeRemoteFingerprint(org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint value) {
+ if (remoteFingerprintBuilder_ == null) {
+ if (((bitField0_ & 0x00000004) == 0x00000004) &&
+ remoteFingerprint_ != org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.getDefaultInstance()) {
+ remoteFingerprint_ =
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.newBuilder(remoteFingerprint_).mergeFrom(value).buildPartial();
+ } else {
+ remoteFingerprint_ = value;
+ }
+ onChanged();
+ } else {
+ remoteFingerprintBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000004;
+ return this;
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ */
+ public Builder clearRemoteFingerprint() {
+ if (remoteFingerprintBuilder_ == null) {
+ remoteFingerprint_ = org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.getDefaultInstance();
+ onChanged();
+ } else {
+ remoteFingerprintBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000004);
+ return this;
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ */
+ public org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.Builder getRemoteFingerprintBuilder() {
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return getRemoteFingerprintFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ */
+ public org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprintOrBuilder getRemoteFingerprintOrBuilder() {
+ if (remoteFingerprintBuilder_ != null) {
+ return remoteFingerprintBuilder_.getMessageOrBuilder();
+ } else {
+ return remoteFingerprint_;
+ }
+ }
+ /**
+ * optional .textsecure.LogicalFingerprint remoteFingerprint = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint, org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.Builder, org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprintOrBuilder>
+ getRemoteFingerprintFieldBuilder() {
+ if (remoteFingerprintBuilder_ == null) {
+ remoteFingerprintBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint, org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprint.Builder, org.session.libsignal.libsignal.fingerprint.FingerprintProtos.LogicalFingerprintOrBuilder>(
+ remoteFingerprint_,
+ getParentForChildren(),
+ isClean());
+ remoteFingerprint_ = null;
+ }
+ return remoteFingerprintBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.CombinedFingerprints)
+ }
+
+ static {
+ defaultInstance = new CombinedFingerprints(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.CombinedFingerprints)
+ }
+
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_textsecure_LogicalFingerprint_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_textsecure_LogicalFingerprint_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_textsecure_CombinedFingerprints_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_textsecure_CombinedFingerprints_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ String[] descriptorData = {
+ "\n\031FingerprintProtocol.proto\022\ntextsecure\"" +
+ "%\n\022LogicalFingerprint\022\017\n\007content\030\001 \001(\014\"\234" +
+ "\001\n\024CombinedFingerprints\022\017\n\007version\030\001 \001(\r" +
+ "\0228\n\020localFingerprint\030\002 \001(\0132\036.textsecure." +
+ "LogicalFingerprint\0229\n\021remoteFingerprint\030" +
+ "\003 \001(\0132\036.textsecure.LogicalFingerprintB=\n" +
+ "(org.session.libsignal.libsignal.fingerprin" +
+ "tB\021FingerprintProtos"
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+ new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
+ com.google.protobuf.Descriptors.FileDescriptor root) {
+ descriptor = root;
+ internal_static_textsecure_LogicalFingerprint_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_textsecure_LogicalFingerprint_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_textsecure_LogicalFingerprint_descriptor,
+ new String[] { "Content", });
+ internal_static_textsecure_CombinedFingerprints_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_textsecure_CombinedFingerprints_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_textsecure_CombinedFingerprints_descriptor,
+ new String[] { "Version", "LocalFingerprint", "RemoteFingerprint", });
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ }, assigner);
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/fingerprint/FingerprintVersionMismatchException.java b/libsignal/src/main/java/org/session/libsignal/libsignal/fingerprint/FingerprintVersionMismatchException.java
new file mode 100644
index 0000000000..efb2fcea03
--- /dev/null
+++ b/libsignal/src/main/java/org/session/libsignal/libsignal/fingerprint/FingerprintVersionMismatchException.java
@@ -0,0 +1,26 @@
+/**
+ * Copyright (C) 2016 Open Whisper Systems
+ *
+ * Licensed according to the LICENSE file in this repository.
+ */
+package org.session.libsignal.libsignal.fingerprint;
+
+public class FingerprintVersionMismatchException extends Exception {
+
+ private final int theirVersion;
+ private final int ourVersion;
+
+ public FingerprintVersionMismatchException(int theirVersion, int ourVersion) {
+ super();
+ this.theirVersion = theirVersion;
+ this.ourVersion = ourVersion;
+ }
+
+ public int getTheirVersion() {
+ return theirVersion;
+ }
+
+ public int getOurVersion() {
+ return ourVersion;
+ }
+}
diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/fingerprint/NumericFingerprintGenerator.java b/libsignal/src/main/java/org/session/libsignal/libsignal/fingerprint/NumericFingerprintGenerator.java
new file mode 100644
index 0000000000..ee7c219861
--- /dev/null
+++ b/libsignal/src/main/java/org/session/libsignal/libsignal/fingerprint/NumericFingerprintGenerator.java
@@ -0,0 +1,127 @@
+/**
+ * Copyright (C) 2016 Open Whisper Systems
+ *
+ * Licensed according to the LICENSE file in this repository.
+ */
+package org.session.libsignal.libsignal.fingerprint;
+
+import org.session.libsignal.libsignal.IdentityKey;
+import org.session.libsignal.libsignal.util.ByteUtil;
+import org.session.libsignal.libsignal.util.IdentityKeyComparator;
+
+import java.io.ByteArrayOutputStream;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+public class NumericFingerprintGenerator implements FingerprintGenerator {
+
+ private static final int FINGERPRINT_VERSION = 0;
+
+ private final int iterations;
+
+ /**
+ * Construct a fingerprint generator for 60 digit numerics.
+ *
+ * @param iterations The number of internal iterations to perform in the process of
+ * generating a fingerprint. This needs to be constant, and synchronized
+ * across all clients.
+ *
+ * The higher the iteration count, the higher the security level:
+ *
+ * - 1024 ~ 109.7 bits
+ * - 1400 > 110 bits
+ * - 5200 > 112 bits
+ */
+ public NumericFingerprintGenerator(int iterations) {
+ this.iterations = iterations;
+ }
+
+ /**
+ * Generate a scannable and displayble fingerprint.
+ *
+ * @param localStableIdentifier The client's "stable" identifier.
+ * @param localIdentityKey The client's identity key.
+ * @param remoteStableIdentifier The remote party's "stable" identifier.
+ * @param remoteIdentityKey The remote party's identity key.
+ * @return A unique fingerprint for this conversation.
+ */
+ @Override
+ public Fingerprint createFor(String localStableIdentifier, final IdentityKey localIdentityKey,
+ String remoteStableIdentifier, final IdentityKey remoteIdentityKey)
+ {
+ return createFor(localStableIdentifier,
+ new LinkedList
+ * The built sessions are unidirectional: they can be used either for sending or for receiving,
+ * but not both.
+ *
+ * Sessions are constructed per (groupId + senderId + deviceId) tuple. Remote logical users
+ * are identified by their senderId, and each logical recipientId can have multiple physical
+ * devices.
+ *
+ * @author Moxie Marlinspike
+ */
+
+public class GroupSessionBuilder {
+
+ private final SenderKeyStore senderKeyStore;
+
+ public GroupSessionBuilder(SenderKeyStore senderKeyStore) {
+ this.senderKeyStore = senderKeyStore;
+ }
+
+ /**
+ * Construct a group session for receiving messages from senderKeyName.
+ *
+ * @param senderKeyName The (groupId, senderId, deviceId) tuple associated with the SenderKeyDistributionMessage.
+ * @param senderKeyDistributionMessage A received SenderKeyDistributionMessage.
+ */
+ public void process(SenderKeyName senderKeyName, SenderKeyDistributionMessage senderKeyDistributionMessage) {
+ synchronized (GroupCipher.LOCK) {
+ SenderKeyRecord senderKeyRecord = senderKeyStore.loadSenderKey(senderKeyName);
+ senderKeyRecord.addSenderKeyState(senderKeyDistributionMessage.getId(),
+ senderKeyDistributionMessage.getIteration(),
+ senderKeyDistributionMessage.getChainKey(),
+ senderKeyDistributionMessage.getSignatureKey());
+ senderKeyStore.storeSenderKey(senderKeyName, senderKeyRecord);
+ }
+ }
+
+ /**
+ * Construct a group session for sending messages.
+ *
+ * @param senderKeyName The (groupId, senderId, deviceId) tuple. In this case, 'senderId' should be the caller.
+ * @return A SenderKeyDistributionMessage that is individually distributed to each member of the group.
+ */
+ public SenderKeyDistributionMessage create(SenderKeyName senderKeyName) {
+ synchronized (GroupCipher.LOCK) {
+ try {
+ SenderKeyRecord senderKeyRecord = senderKeyStore.loadSenderKey(senderKeyName);
+
+ if (senderKeyRecord.isEmpty()) {
+ senderKeyRecord.setSenderKeyState(KeyHelper.generateSenderKeyId(),
+ 0,
+ KeyHelper.generateSenderKey(),
+ KeyHelper.generateSenderSigningKey());
+ senderKeyStore.storeSenderKey(senderKeyName, senderKeyRecord);
+ }
+
+ SenderKeyState state = senderKeyRecord.getSenderKeyState();
+
+ return new SenderKeyDistributionMessage(state.getKeyId(),
+ state.getSenderChainKey().getIteration(),
+ state.getSenderChainKey().getSeed(),
+ state.getSigningKeyPublic());
+
+ } catch (InvalidKeyIdException e) {
+ throw new AssertionError(e);
+ } catch (InvalidKeyException e) {
+ throw new AssertionError(e);
+ }
+ }
+ }
+}
diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/groups/SenderKeyName.java b/libsignal/src/main/java/org/session/libsignal/libsignal/groups/SenderKeyName.java
new file mode 100644
index 0000000000..836c7ca6c7
--- /dev/null
+++ b/libsignal/src/main/java/org/session/libsignal/libsignal/groups/SenderKeyName.java
@@ -0,0 +1,52 @@
+/**
+ * Copyright (C) 2014-2016 Open Whisper Systems
+ *
+ * Licensed according to the LICENSE file in this repository.
+ */
+package org.session.libsignal.libsignal.groups;
+
+import org.session.libsignal.libsignal.SignalProtocolAddress;
+
+/**
+ * A representation of a (groupId + senderId + deviceId) tuple.
+ */
+public class SenderKeyName {
+
+ private final String groupId;
+ private final SignalProtocolAddress sender;
+
+ public SenderKeyName(String groupId, SignalProtocolAddress sender) {
+ this.groupId = groupId;
+ this.sender = sender;
+ }
+
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public SignalProtocolAddress getSender() {
+ return sender;
+ }
+
+ public String serialize() {
+ return groupId + "::" + sender.getName() + "::" + String.valueOf(sender.getDeviceId());
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (other == null) return false;
+ if (!(other instanceof SenderKeyName)) return false;
+
+ SenderKeyName that = (SenderKeyName)other;
+
+ return
+ this.groupId.equals(that.groupId) &&
+ this.sender.equals(that.sender);
+ }
+
+ @Override
+ public int hashCode() {
+ return this.groupId.hashCode() ^ this.sender.hashCode();
+ }
+
+}
diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/groups/ratchet/SenderChainKey.java b/libsignal/src/main/java/org/session/libsignal/libsignal/groups/ratchet/SenderChainKey.java
new file mode 100644
index 0000000000..38a0d0520f
--- /dev/null
+++ b/libsignal/src/main/java/org/session/libsignal/libsignal/groups/ratchet/SenderChainKey.java
@@ -0,0 +1,68 @@
+/**
+ * Copyright (C) 2014-2016 Open Whisper Systems
+ *
+ * Licensed according to the LICENSE file in this repository.
+ */
+package org.session.libsignal.libsignal.groups.ratchet;
+
+import org.session.libsignal.libsignal.groups.ratchet.SenderMessageKey;
+
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+
+import javax.crypto.Mac;
+import javax.crypto.spec.SecretKeySpec;
+
+/**
+ * Each SenderKey is a "chain" of keys, each derived from the previous.
+ *
+ * At any given point in time, the state of a SenderKey can be represented
+ * as the current chain key value, along with its iteration count. From there,
+ * subsequent iterations can be derived, as well as individual message keys from
+ * each chain key.
+ *
+ * @author Moxie Marlinspike
+ */
+public class SenderChainKey {
+
+ private static final byte[] MESSAGE_KEY_SEED = {0x01};
+ private static final byte[] CHAIN_KEY_SEED = {0x02};
+
+ private final int iteration;
+ private final byte[] chainKey;
+
+ public SenderChainKey(int iteration, byte[] chainKey) {
+ this.iteration = iteration;
+ this.chainKey = chainKey;
+ }
+
+ public int getIteration() {
+ return iteration;
+ }
+
+ public SenderMessageKey getSenderMessageKey() {
+ return new SenderMessageKey(iteration, getDerivative(MESSAGE_KEY_SEED, chainKey));
+ }
+
+ public SenderChainKey getNext() {
+ return new SenderChainKey(iteration + 1, getDerivative(CHAIN_KEY_SEED, chainKey));
+ }
+
+ public byte[] getSeed() {
+ return chainKey;
+ }
+
+ private byte[] getDerivative(byte[] seed, byte[] key) {
+ try {
+ Mac mac = Mac.getInstance("HmacSHA256");
+ mac.init(new SecretKeySpec(key, "HmacSHA256"));
+
+ return mac.doFinal(seed);
+ } catch (NoSuchAlgorithmException e) {
+ throw new AssertionError(e);
+ } catch (InvalidKeyException e) {
+ throw new AssertionError(e);
+ }
+ }
+
+}
diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/groups/ratchet/SenderMessageKey.java b/libsignal/src/main/java/org/session/libsignal/libsignal/groups/ratchet/SenderMessageKey.java
new file mode 100644
index 0000000000..e27f788ea8
--- /dev/null
+++ b/libsignal/src/main/java/org/session/libsignal/libsignal/groups/ratchet/SenderMessageKey.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright (C) 2014-2016 Open Whisper Systems
+ *
+ * Licensed according to the LICENSE file in this repository.
+ */
+
+package org.session.libsignal.libsignal.groups.ratchet;
+
+import org.session.libsignal.libsignal.kdf.HKDFv3;
+import org.session.libsignal.libsignal.util.ByteUtil;
+
+/**
+ * The final symmetric material (IV and Cipher Key) used for encrypting
+ * individual SenderKey messages.
+ *
+ * @author Moxie Marlinspike
+ */
+public class SenderMessageKey {
+
+ private final int iteration;
+ private final byte[] iv;
+ private final byte[] cipherKey;
+ private final byte[] seed;
+
+ public SenderMessageKey(int iteration, byte[] seed) {
+ byte[] derivative = new HKDFv3().deriveSecrets(seed, "WhisperGroup".getBytes(), 48);
+ byte[][] parts = ByteUtil.split(derivative, 16, 32);
+
+ this.iteration = iteration;
+ this.seed = seed;
+ this.iv = parts[0];
+ this.cipherKey = parts[1];
+ }
+
+ public int getIteration() {
+ return iteration;
+ }
+
+ public byte[] getIv() {
+ return iv;
+ }
+
+ public byte[] getCipherKey() {
+ return cipherKey;
+ }
+
+ public byte[] getSeed() {
+ return seed;
+ }
+}
diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/groups/state/SenderKeyRecord.java b/libsignal/src/main/java/org/session/libsignal/libsignal/groups/state/SenderKeyRecord.java
new file mode 100644
index 0000000000..12c0446b5a
--- /dev/null
+++ b/libsignal/src/main/java/org/session/libsignal/libsignal/groups/state/SenderKeyRecord.java
@@ -0,0 +1,85 @@
+/**
+ * Copyright (C) 2014-2016 Open Whisper Systems
+ *
+ * Licensed according to the LICENSE file in this repository.
+ */
+package org.session.libsignal.libsignal.groups.state;
+
+import org.session.libsignal.libsignal.InvalidKeyIdException;
+import org.session.libsignal.libsignal.ecc.ECKeyPair;
+import org.session.libsignal.libsignal.ecc.ECPublicKey;
+import org.session.libsignal.libsignal.state.StorageProtos;
+
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+
+import static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyRecordStructure;
+
+/**
+ * A durable representation of a set of SenderKeyStates for a specific
+ * SenderKeyName.
+ *
+ * @author Moxie Marlisnpike
+ */
+public class SenderKeyRecord {
+
+ private static final int MAX_STATES = 5;
+
+ private LinkedList
+ * It is important that implementations return a copy of the current durable information. The
+ * returned SenderKeyRecord may be modified, but those changes should not have an effect on the
+ * durable session state (what is returned by subsequent calls to this method) without the
+ * store method being called here first.
+ *
+ * @param senderKeyName The (groupId + senderId + deviceId) tuple.
+ * @return a copy of the SenderKeyRecord corresponding to the (groupId + senderId + deviceId tuple, or
+ * a new SenderKeyRecord if one does not currently exist.
+ */
+
+ public SenderKeyRecord loadSenderKey(SenderKeyName senderKeyName);
+}
diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/kdf/DerivedMessageSecrets.java b/libsignal/src/main/java/org/session/libsignal/libsignal/kdf/DerivedMessageSecrets.java
new file mode 100644
index 0000000000..ef1c28cda8
--- /dev/null
+++ b/libsignal/src/main/java/org/session/libsignal/libsignal/kdf/DerivedMessageSecrets.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright (C) 2014-2016 Open Whisper Systems
+ *
+ * Licensed according to the LICENSE file in this repository.
+ */
+
+package org.session.libsignal.libsignal.kdf;
+
+import org.session.libsignal.libsignal.util.ByteUtil;
+
+import java.text.ParseException;
+
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+
+public class DerivedMessageSecrets {
+
+ public static final int SIZE = 80;
+ private static final int CIPHER_KEY_LENGTH = 32;
+ private static final int MAC_KEY_LENGTH = 32;
+ private static final int IV_LENGTH = 16;
+
+ private final SecretKeySpec cipherKey;
+ private final SecretKeySpec macKey;
+ private final IvParameterSpec iv;
+
+ public DerivedMessageSecrets(byte[] okm) {
+ try {
+ byte[][] keys = ByteUtil.split(okm, CIPHER_KEY_LENGTH, MAC_KEY_LENGTH, IV_LENGTH);
+
+ this.cipherKey = new SecretKeySpec(keys[0], "AES");
+ this.macKey = new SecretKeySpec(keys[1], "HmacSHA256");
+ this.iv = new IvParameterSpec(keys[2]);
+ } catch (ParseException e) {
+ throw new AssertionError(e);
+ }
+ }
+
+ public SecretKeySpec getCipherKey() {
+ return cipherKey;
+ }
+
+ public SecretKeySpec getMacKey() {
+ return macKey;
+ }
+
+ public IvParameterSpec getIv() {
+ return iv;
+ }
+}
diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/kdf/DerivedRootSecrets.java b/libsignal/src/main/java/org/session/libsignal/libsignal/kdf/DerivedRootSecrets.java
new file mode 100644
index 0000000000..e43bcccddd
--- /dev/null
+++ b/libsignal/src/main/java/org/session/libsignal/libsignal/kdf/DerivedRootSecrets.java
@@ -0,0 +1,31 @@
+/**
+ * Copyright (C) 2014-2016 Open Whisper Systems
+ *
+ * Licensed according to the LICENSE file in this repository.
+ */
+package org.session.libsignal.libsignal.kdf;
+
+import org.session.libsignal.libsignal.util.ByteUtil;
+
+public class DerivedRootSecrets {
+
+ public static final int SIZE = 64;
+
+ private final byte[] rootKey;
+ private final byte[] chainKey;
+
+ public DerivedRootSecrets(byte[] okm) {
+ byte[][] keys = ByteUtil.split(okm, 32, 32);
+ this.rootKey = keys[0];
+ this.chainKey = keys[1];
+ }
+
+ public byte[] getRootKey() {
+ return rootKey;
+ }
+
+ public byte[] getChainKey() {
+ return chainKey;
+ }
+
+}
diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/kdf/HKDF.java b/libsignal/src/main/java/org/session/libsignal/libsignal/kdf/HKDF.java
new file mode 100644
index 0000000000..546529b2d5
--- /dev/null
+++ b/libsignal/src/main/java/org/session/libsignal/libsignal/kdf/HKDF.java
@@ -0,0 +1,89 @@
+/**
+ * Copyright (C) 2013-2016 Open Whisper Systems
+ *
+ * Licensed according to the LICENSE file in this repository.
+ */
+
+package org.session.libsignal.libsignal.kdf;
+
+import org.session.libsignal.libsignal.kdf.HKDFv2;
+import org.session.libsignal.libsignal.kdf.HKDFv3;
+
+import java.io.ByteArrayOutputStream;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+
+import javax.crypto.Mac;
+import javax.crypto.spec.SecretKeySpec;
+
+public abstract class HKDF {
+
+ private static final int HASH_OUTPUT_SIZE = 32;
+
+ public static HKDF createFor(int messageVersion) {
+ switch (messageVersion) {
+ case 2: return new HKDFv2();
+ case 3: return new HKDFv3();
+ default: throw new AssertionError("Unknown version: " + messageVersion);
+ }
+ }
+
+ public byte[] deriveSecrets(byte[] inputKeyMaterial, byte[] info, int outputLength) {
+ byte[] salt = new byte[HASH_OUTPUT_SIZE];
+ return deriveSecrets(inputKeyMaterial, salt, info, outputLength);
+ }
+
+ public byte[] deriveSecrets(byte[] inputKeyMaterial, byte[] salt, byte[] info, int outputLength) {
+ byte[] prk = extract(salt, inputKeyMaterial);
+ return expand(prk, info, outputLength);
+ }
+
+ private byte[] extract(byte[] salt, byte[] inputKeyMaterial) {
+ try {
+ Mac mac = Mac.getInstance("HmacSHA256");
+ mac.init(new SecretKeySpec(salt, "HmacSHA256"));
+ return mac.doFinal(inputKeyMaterial);
+ } catch (NoSuchAlgorithmException e) {
+ throw new AssertionError(e);
+ } catch (InvalidKeyException e) {
+ throw new AssertionError(e);
+ }
+ }
+
+ private byte[] expand(byte[] prk, byte[] info, int outputSize) {
+ try {
+ int iterations = (int) Math.ceil((double) outputSize / (double) HASH_OUTPUT_SIZE);
+ byte[] mixin = new byte[0];
+ ByteArrayOutputStream results = new ByteArrayOutputStream();
+ int remainingBytes = outputSize;
+
+ for (int i= getIterationStartOffset();i
+ * Clients should maintain a registration ID, a random number
+ * between 1 and 16380 that's generated once at install time.
+ *
+ * @return the local client's registration ID.
+ */
+ public int getLocalRegistrationId();
+
+ /**
+ * Save a remote client's identity key
+ *
+ * Store a remote client's identity key as trusted.
+ *
+ * @param address The address of the remote client.
+ * @param identityKey The remote client's identity key.
+ * @return True if the identity key replaces a previous identity, false if not
+ */
+ public boolean saveIdentity(SignalProtocolAddress address, IdentityKey identityKey);
+
+
+ /**
+ * Verify a remote client's identity key.
+ *
+ * Determine whether a remote client's identity is trusted. Convention is
+ * that the Signal Protocol is 'trust on first use.' This means that
+ * an identity key is considered 'trusted' if there is no entry for the recipient
+ * in the local store, or if it matches the saved key for a recipient in the local
+ * store. Only if it mismatches an entry in the local store is it considered
+ * 'untrusted.'
+ *
+ * Clients may wish to make a distinction as to how keys are trusted based on the
+ * direction of travel. For instance, clients may wish to accept all 'incoming' identity
+ * key changes, while only blocking identity key changes when sending a message.
+ *
+ * @param address The address of the remote client.
+ * @param identityKey The identity key to verify.
+ * @param direction The direction (sending or receiving) this identity is being used for.
+ * @return true if trusted, false if untrusted.
+ */
+ public boolean isTrustedIdentity(SignalProtocolAddress address, IdentityKey identityKey, Direction direction);
+
+
+ /**
+ * Return the saved public identity key for a remote client
+ *
+ * @param address The address of the remote client
+ * @return The public identity key, or null if absent
+ */
+ public IdentityKey getIdentity(SignalProtocolAddress address);
+
+}
diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/state/PreKeyBundle.java b/libsignal/src/main/java/org/session/libsignal/libsignal/state/PreKeyBundle.java
new file mode 100644
index 0000000000..bc12d58d53
--- /dev/null
+++ b/libsignal/src/main/java/org/session/libsignal/libsignal/state/PreKeyBundle.java
@@ -0,0 +1,101 @@
+/**
+ * Copyright (C) 2014-2016 Open Whisper Systems
+ *
+ * Licensed according to the LICENSE file in this repository.
+ */
+package org.session.libsignal.libsignal.state;
+
+import org.session.libsignal.libsignal.IdentityKey;
+import org.session.libsignal.libsignal.ecc.ECPublicKey;
+
+/**
+ * A class that contains a remote PreKey and collection
+ * of associated items.
+ *
+ * @author Moxie Marlinspike
+ */
+public class PreKeyBundle {
+
+ private int registrationId;
+
+ private int deviceId;
+
+ private int preKeyId;
+ private ECPublicKey preKeyPublic;
+
+ private int signedPreKeyId;
+ private ECPublicKey signedPreKeyPublic;
+ private byte[] signedPreKeySignature;
+
+ private IdentityKey identityKey;
+
+ public PreKeyBundle(int registrationId, int deviceId, int preKeyId, ECPublicKey preKeyPublic,
+ int signedPreKeyId, ECPublicKey signedPreKeyPublic, byte[] signedPreKeySignature,
+ IdentityKey identityKey)
+ {
+ this.registrationId = registrationId;
+ this.deviceId = deviceId;
+ this.preKeyId = preKeyId;
+ this.preKeyPublic = preKeyPublic;
+ this.signedPreKeyId = signedPreKeyId;
+ this.signedPreKeyPublic = signedPreKeyPublic;
+ this.signedPreKeySignature = signedPreKeySignature;
+ this.identityKey = identityKey;
+ }
+
+ /**
+ * @return the device ID this PreKey belongs to.
+ */
+ public int getDeviceId() {
+ return deviceId;
+ }
+
+ /**
+ * @return the unique key ID for this PreKey.
+ */
+ public int getPreKeyId() {
+ return preKeyId;
+ }
+
+ /**
+ * @return the public key for this PreKey.
+ */
+ public ECPublicKey getPreKey() {
+ return preKeyPublic;
+ }
+
+ /**
+ * @return the unique key ID for this signed prekey.
+ */
+ public int getSignedPreKeyId() {
+ return signedPreKeyId;
+ }
+
+ /**
+ * @return the signed prekey for this PreKeyBundle.
+ */
+ public ECPublicKey getSignedPreKey() {
+ return signedPreKeyPublic;
+ }
+
+ /**
+ * @return the signature over the signed prekey.
+ */
+ public byte[] getSignedPreKeySignature() {
+ return signedPreKeySignature;
+ }
+
+ /**
+ * @return the {@link IdentityKey} of this PreKeys owner.
+ */
+ public IdentityKey getIdentityKey() {
+ return identityKey;
+ }
+
+ /**
+ * @return the registration ID associated with this PreKey.
+ */
+ public int getRegistrationId() {
+ return registrationId;
+ }
+}
diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/state/PreKeyRecord.java b/libsignal/src/main/java/org/session/libsignal/libsignal/state/PreKeyRecord.java
new file mode 100644
index 0000000000..c5706f9487
--- /dev/null
+++ b/libsignal/src/main/java/org/session/libsignal/libsignal/state/PreKeyRecord.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (C) 2014-2016 Open Whisper Systems
+ *
+ * Licensed according to the LICENSE file in this repository.
+ */
+package org.session.libsignal.libsignal.state;
+
+import com.google.protobuf.ByteString;
+
+import org.session.libsignal.libsignal.InvalidKeyException;
+import org.session.libsignal.libsignal.ecc.Curve;
+import org.session.libsignal.libsignal.ecc.ECKeyPair;
+import org.session.libsignal.libsignal.ecc.ECPrivateKey;
+import org.session.libsignal.libsignal.ecc.ECPublicKey;
+
+import java.io.IOException;
+
+import static org.session.libsignal.libsignal.state.StorageProtos.PreKeyRecordStructure;
+
+public class PreKeyRecord {
+
+ private PreKeyRecordStructure structure;
+
+ public PreKeyRecord(int id, ECKeyPair keyPair) {
+ this.structure = PreKeyRecordStructure.newBuilder()
+ .setId(id)
+ .setPublicKey(ByteString.copyFrom(keyPair.getPublicKey()
+ .serialize()))
+ .setPrivateKey(ByteString.copyFrom(keyPair.getPrivateKey()
+ .serialize()))
+ .build();
+ }
+
+ public PreKeyRecord(byte[] serialized) throws IOException {
+ this.structure = PreKeyRecordStructure.parseFrom(serialized);
+ }
+
+ public int getId() {
+ return this.structure.getId();
+ }
+
+ public ECKeyPair getKeyPair() {
+ try {
+ ECPublicKey publicKey = Curve.decodePoint(this.structure.getPublicKey().toByteArray(), 0);
+ ECPrivateKey privateKey = Curve.decodePrivatePoint(this.structure.getPrivateKey().toByteArray());
+
+ return new ECKeyPair(publicKey, privateKey);
+ } catch (InvalidKeyException e) {
+ throw new AssertionError(e);
+ }
+ }
+
+ public byte[] serialize() {
+ return this.structure.toByteArray();
+ }
+}
diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/state/PreKeyStore.java b/libsignal/src/main/java/org/session/libsignal/libsignal/state/PreKeyStore.java
new file mode 100644
index 0000000000..e7969571da
--- /dev/null
+++ b/libsignal/src/main/java/org/session/libsignal/libsignal/state/PreKeyStore.java
@@ -0,0 +1,48 @@
+/**
+ * Copyright (C) 2014-2016 Open Whisper Systems
+ *
+ * Licensed according to the LICENSE file in this repository.
+ */
+package org.session.libsignal.libsignal.state;
+
+import org.session.libsignal.libsignal.InvalidKeyIdException;
+import org.session.libsignal.libsignal.state.PreKeyRecord;
+
+/**
+ * An interface describing the local storage of {@link PreKeyRecord}s.
+ *
+ * @author Moxie Marlinspike
+ */
+public interface PreKeyStore {
+
+ /**
+ * Load a local PreKeyRecord.
+ *
+ * @param preKeyId the ID of the local PreKeyRecord.
+ * @return the corresponding PreKeyRecord.
+ * @throws InvalidKeyIdException when there is no corresponding PreKeyRecord.
+ */
+ public PreKeyRecord loadPreKey(int preKeyId) throws InvalidKeyIdException;
+
+ /**
+ * Store a local PreKeyRecord.
+ *
+ * @param preKeyId the ID of the PreKeyRecord to store.
+ * @param record the PreKeyRecord.
+ */
+ public void storePreKey(int preKeyId, PreKeyRecord record);
+
+ /**
+ * @param preKeyId A PreKeyRecord ID.
+ * @return true if the store has a record for the preKeyId, otherwise false.
+ */
+ public boolean containsPreKey(int preKeyId);
+
+ /**
+ * Delete a PreKeyRecord from local storage.
+ *
+ * @param preKeyId The ID of the PreKeyRecord to remove.
+ */
+ public void removePreKey(int preKeyId);
+
+}
diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/state/SessionRecord.java b/libsignal/src/main/java/org/session/libsignal/libsignal/state/SessionRecord.java
new file mode 100644
index 0000000000..df1d0ff25c
--- /dev/null
+++ b/libsignal/src/main/java/org/session/libsignal/libsignal/state/SessionRecord.java
@@ -0,0 +1,125 @@
+/**
+ * Copyright (C) 2014-2016 Open Whisper Systems
+ *
+ * Licensed according to the LICENSE file in this repository.
+ */
+package org.session.libsignal.libsignal.state;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+
+import static org.session.libsignal.libsignal.state.StorageProtos.RecordStructure;
+import static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure;
+
+/**
+ * A SessionRecord encapsulates the state of an ongoing session.
+ *
+ * @author Moxie Marlinspike
+ */
+public class SessionRecord {
+
+ private static final int ARCHIVED_STATES_MAX_LENGTH = 40;
+
+ private SessionState sessionState = new SessionState();
+ private LinkedList
+ * It is important that implementations return a copy of the current durable information. The
+ * returned SessionRecord may be modified, but those changes should not have an effect on the
+ * durable session state (what is returned by subsequent calls to this method) without the
+ * store method being called here first.
+ *
+ * @param address The name and device ID of the remote client.
+ * @return a copy of the SessionRecord corresponding to the recipientId + deviceId tuple, or
+ * a new SessionRecord if one does not currently exist.
+ */
+ public SessionRecord loadSession(SignalProtocolAddress address);
+
+ /**
+ * Returns all known devices with active sessions for a recipient
+ *
+ * @param name the name of the client.
+ * @return all known sub-devices with active sessions.
+ */
+ public List
+ * PreKey IDs are shorts, so they will eventually be repeated. Clients should
+ * store PreKeys in a circular buffer, so that they are repeated as infrequently
+ * as possible.
+ *
+ * @param start The starting PreKey ID, inclusive.
+ * @param count The number of PreKeys to generate.
+ * @return the list of generated PreKeyRecords.
+ */
+ public static Listoptional bytes ratchetKey = 1;
+ */
+ boolean hasRatchetKey();
+ /**
+ * optional bytes ratchetKey = 1;
+ */
+ com.google.protobuf.ByteString getRatchetKey();
+
+ // optional uint32 counter = 2;
+ /**
+ * optional uint32 counter = 2;
+ */
+ boolean hasCounter();
+ /**
+ * optional uint32 counter = 2;
+ */
+ int getCounter();
+
+ // optional uint32 previousCounter = 3;
+ /**
+ * optional uint32 previousCounter = 3;
+ */
+ boolean hasPreviousCounter();
+ /**
+ * optional uint32 previousCounter = 3;
+ */
+ int getPreviousCounter();
+
+ // optional bytes ciphertext = 4;
+ /**
+ * optional bytes ciphertext = 4;
+ */
+ boolean hasCiphertext();
+ /**
+ * optional bytes ciphertext = 4;
+ */
+ com.google.protobuf.ByteString getCiphertext();
+ }
+ /**
+ * Protobuf type {@code textsecure.SignalMessage}
+ */
+ public static final class SignalMessage extends
+ com.google.protobuf.GeneratedMessage
+ implements SignalMessageOrBuilder {
+ // Use SignalMessage.newBuilder() to construct.
+ private SignalMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private SignalMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final SignalMessage defaultInstance;
+ public static SignalMessage getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public SignalMessage getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @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 {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ bitField0_ |= 0x00000001;
+ 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;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_SignalMessage_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_SignalMessage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage.class, org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional bytes ratchetKey = 1;
+ */
+ public boolean hasRatchetKey() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional bytes ratchetKey = 1;
+ */
+ public com.google.protobuf.ByteString getRatchetKey() {
+ return ratchetKey_;
+ }
+
+ // optional uint32 counter = 2;
+ public static final int COUNTER_FIELD_NUMBER = 2;
+ private int counter_;
+ /**
+ * optional uint32 counter = 2;
+ */
+ public boolean hasCounter() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional uint32 counter = 2;
+ */
+ public int getCounter() {
+ return counter_;
+ }
+
+ // optional uint32 previousCounter = 3;
+ public static final int PREVIOUSCOUNTER_FIELD_NUMBER = 3;
+ private int previousCounter_;
+ /**
+ * optional uint32 previousCounter = 3;
+ */
+ public boolean hasPreviousCounter() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional uint32 previousCounter = 3;
+ */
+ public int getPreviousCounter() {
+ return previousCounter_;
+ }
+
+ // optional bytes ciphertext = 4;
+ public static final int CIPHERTEXT_FIELD_NUMBER = 4;
+ private com.google.protobuf.ByteString ciphertext_;
+ /**
+ * optional bytes ciphertext = 4;
+ */
+ public boolean hasCiphertext() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional bytes ciphertext = 4;
+ */
+ public com.google.protobuf.ByteString getCiphertext() {
+ return ciphertext_;
+ }
+
+ private void initFields() {
+ ratchetKey_ = com.google.protobuf.ByteString.EMPTY;
+ counter_ = 0;
+ previousCounter_ = 0;
+ ciphertext_ = com.google.protobuf.ByteString.EMPTY;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeBytes(1, ratchetKey_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeUInt32(2, counter_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeUInt32(3, previousCounter_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ output.writeBytes(4, ciphertext_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(1, ratchetKey_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(2, counter_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(3, previousCounter_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(4, ciphertext_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.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.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.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.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.protocol.SignalProtos.SignalMessage prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.SignalMessage}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional bytes ratchetKey = 1;
+ */
+ public boolean hasRatchetKey() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional bytes ratchetKey = 1;
+ */
+ public com.google.protobuf.ByteString getRatchetKey() {
+ return ratchetKey_;
+ }
+ /**
+ * optional bytes ratchetKey = 1;
+ */
+ public Builder setRatchetKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ ratchetKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes ratchetKey = 1;
+ */
+ public Builder clearRatchetKey() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ ratchetKey_ = getDefaultInstance().getRatchetKey();
+ onChanged();
+ return this;
+ }
+
+ // optional uint32 counter = 2;
+ private int counter_ ;
+ /**
+ * optional uint32 counter = 2;
+ */
+ public boolean hasCounter() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional uint32 counter = 2;
+ */
+ public int getCounter() {
+ return counter_;
+ }
+ /**
+ * optional uint32 counter = 2;
+ */
+ public Builder setCounter(int value) {
+ bitField0_ |= 0x00000002;
+ counter_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 counter = 2;
+ */
+ public Builder clearCounter() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ counter_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional uint32 previousCounter = 3;
+ private int previousCounter_ ;
+ /**
+ * optional uint32 previousCounter = 3;
+ */
+ public boolean hasPreviousCounter() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional uint32 previousCounter = 3;
+ */
+ public int getPreviousCounter() {
+ return previousCounter_;
+ }
+ /**
+ * optional uint32 previousCounter = 3;
+ */
+ public Builder setPreviousCounter(int value) {
+ bitField0_ |= 0x00000004;
+ previousCounter_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 previousCounter = 3;
+ */
+ public Builder clearPreviousCounter() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ previousCounter_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional bytes ciphertext = 4;
+ private com.google.protobuf.ByteString ciphertext_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes ciphertext = 4;
+ */
+ public boolean hasCiphertext() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional bytes ciphertext = 4;
+ */
+ public com.google.protobuf.ByteString getCiphertext() {
+ return ciphertext_;
+ }
+ /**
+ * optional bytes ciphertext = 4;
+ */
+ public Builder setCiphertext(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000008;
+ ciphertext_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes ciphertext = 4;
+ */
+ public Builder clearCiphertext() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ ciphertext_ = getDefaultInstance().getCiphertext();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.SignalMessage)
+ }
+
+ static {
+ defaultInstance = new SignalMessage(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.SignalMessage)
+ }
+
+ public interface PreKeySignalMessageOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional uint32 registrationId = 5;
+ /**
+ * optional uint32 registrationId = 5;
+ */
+ boolean hasRegistrationId();
+ /**
+ * optional uint32 registrationId = 5;
+ */
+ int getRegistrationId();
+
+ // optional uint32 preKeyId = 1;
+ /**
+ * optional uint32 preKeyId = 1;
+ */
+ boolean hasPreKeyId();
+ /**
+ * optional uint32 preKeyId = 1;
+ */
+ int getPreKeyId();
+
+ // optional uint32 signedPreKeyId = 6;
+ /**
+ * optional uint32 signedPreKeyId = 6;
+ */
+ boolean hasSignedPreKeyId();
+ /**
+ * optional uint32 signedPreKeyId = 6;
+ */
+ int getSignedPreKeyId();
+
+ // optional bytes baseKey = 2;
+ /**
+ * optional bytes baseKey = 2;
+ */
+ boolean hasBaseKey();
+ /**
+ * optional bytes baseKey = 2;
+ */
+ com.google.protobuf.ByteString getBaseKey();
+
+ // optional bytes identityKey = 3;
+ /**
+ * optional bytes identityKey = 3;
+ */
+ boolean hasIdentityKey();
+ /**
+ * optional bytes identityKey = 3;
+ */
+ com.google.protobuf.ByteString getIdentityKey();
+
+ // optional bytes message = 4;
+ /**
+ * optional bytes message = 4;
+ *
+ *
+ * SignalMessage
+ *
+ */
+ boolean hasMessage();
+ /**
+ * optional bytes message = 4;
+ *
+ *
+ * SignalMessage
+ *
+ */
+ com.google.protobuf.ByteString getMessage();
+ }
+ /**
+ * Protobuf type {@code textsecure.PreKeySignalMessage}
+ */
+ public static final class PreKeySignalMessage extends
+ com.google.protobuf.GeneratedMessage
+ implements PreKeySignalMessageOrBuilder {
+ // Use PreKeySignalMessage.newBuilder() to construct.
+ private PreKeySignalMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private PreKeySignalMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final PreKeySignalMessage defaultInstance;
+ public static PreKeySignalMessage getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public PreKeySignalMessage getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @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 {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 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;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_PreKeySignalMessage_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_PreKeySignalMessage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage.class, org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional uint32 registrationId = 5;
+ */
+ public boolean hasRegistrationId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 registrationId = 5;
+ */
+ public int getRegistrationId() {
+ return registrationId_;
+ }
+
+ // optional uint32 preKeyId = 1;
+ public static final int PREKEYID_FIELD_NUMBER = 1;
+ private int preKeyId_;
+ /**
+ * optional uint32 preKeyId = 1;
+ */
+ public boolean hasPreKeyId() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional uint32 preKeyId = 1;
+ */
+ public int getPreKeyId() {
+ return preKeyId_;
+ }
+
+ // optional uint32 signedPreKeyId = 6;
+ public static final int SIGNEDPREKEYID_FIELD_NUMBER = 6;
+ private int signedPreKeyId_;
+ /**
+ * optional uint32 signedPreKeyId = 6;
+ */
+ public boolean hasSignedPreKeyId() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional uint32 signedPreKeyId = 6;
+ */
+ public int getSignedPreKeyId() {
+ return signedPreKeyId_;
+ }
+
+ // optional bytes baseKey = 2;
+ public static final int BASEKEY_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString baseKey_;
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public boolean hasBaseKey() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public com.google.protobuf.ByteString getBaseKey() {
+ return baseKey_;
+ }
+
+ // optional bytes identityKey = 3;
+ public static final int IDENTITYKEY_FIELD_NUMBER = 3;
+ private com.google.protobuf.ByteString identityKey_;
+ /**
+ * optional bytes identityKey = 3;
+ */
+ public boolean hasIdentityKey() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * optional bytes identityKey = 3;
+ */
+ public com.google.protobuf.ByteString getIdentityKey() {
+ return identityKey_;
+ }
+
+ // optional bytes message = 4;
+ public static final int MESSAGE_FIELD_NUMBER = 4;
+ private com.google.protobuf.ByteString message_;
+ /**
+ * optional bytes message = 4;
+ *
+ *
+ * SignalMessage
+ *
+ */
+ public boolean hasMessage() {
+ return ((bitField0_ & 0x00000020) == 0x00000020);
+ }
+ /**
+ * optional bytes message = 4;
+ *
+ *
+ * SignalMessage
+ *
+ */
+ public com.google.protobuf.ByteString getMessage() {
+ return message_;
+ }
+
+ private void initFields() {
+ registrationId_ = 0;
+ preKeyId_ = 0;
+ signedPreKeyId_ = 0;
+ baseKey_ = com.google.protobuf.ByteString.EMPTY;
+ identityKey_ = com.google.protobuf.ByteString.EMPTY;
+ message_ = com.google.protobuf.ByteString.EMPTY;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeUInt32(1, preKeyId_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ output.writeBytes(2, baseKey_);
+ }
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ output.writeBytes(3, identityKey_);
+ }
+ if (((bitField0_ & 0x00000020) == 0x00000020)) {
+ output.writeBytes(4, message_);
+ }
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeUInt32(5, registrationId_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeUInt32(6, signedPreKeyId_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, preKeyId_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, baseKey_);
+ }
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(3, identityKey_);
+ }
+ if (((bitField0_ & 0x00000020) == 0x00000020)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(4, message_);
+ }
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(5, registrationId_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(6, signedPreKeyId_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.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.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.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.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.protocol.SignalProtos.PreKeySignalMessage prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.PreKeySignalMessage}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional uint32 registrationId = 5;
+ */
+ public boolean hasRegistrationId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 registrationId = 5;
+ */
+ public int getRegistrationId() {
+ return registrationId_;
+ }
+ /**
+ * optional uint32 registrationId = 5;
+ */
+ public Builder setRegistrationId(int value) {
+ bitField0_ |= 0x00000001;
+ registrationId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 registrationId = 5;
+ */
+ public Builder clearRegistrationId() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ registrationId_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional uint32 preKeyId = 1;
+ private int preKeyId_ ;
+ /**
+ * optional uint32 preKeyId = 1;
+ */
+ public boolean hasPreKeyId() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional uint32 preKeyId = 1;
+ */
+ public int getPreKeyId() {
+ return preKeyId_;
+ }
+ /**
+ * optional uint32 preKeyId = 1;
+ */
+ public Builder setPreKeyId(int value) {
+ bitField0_ |= 0x00000002;
+ preKeyId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 preKeyId = 1;
+ */
+ public Builder clearPreKeyId() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ preKeyId_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional uint32 signedPreKeyId = 6;
+ private int signedPreKeyId_ ;
+ /**
+ * optional uint32 signedPreKeyId = 6;
+ */
+ public boolean hasSignedPreKeyId() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional uint32 signedPreKeyId = 6;
+ */
+ public int getSignedPreKeyId() {
+ return signedPreKeyId_;
+ }
+ /**
+ * optional uint32 signedPreKeyId = 6;
+ */
+ public Builder setSignedPreKeyId(int value) {
+ bitField0_ |= 0x00000004;
+ signedPreKeyId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 signedPreKeyId = 6;
+ */
+ public Builder clearSignedPreKeyId() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ signedPreKeyId_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional bytes baseKey = 2;
+ private com.google.protobuf.ByteString baseKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public boolean hasBaseKey() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public com.google.protobuf.ByteString getBaseKey() {
+ return baseKey_;
+ }
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public Builder setBaseKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000008;
+ baseKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public Builder clearBaseKey() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ baseKey_ = getDefaultInstance().getBaseKey();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes identityKey = 3;
+ private com.google.protobuf.ByteString identityKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes identityKey = 3;
+ */
+ public boolean hasIdentityKey() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * optional bytes identityKey = 3;
+ */
+ public com.google.protobuf.ByteString getIdentityKey() {
+ return identityKey_;
+ }
+ /**
+ * optional bytes identityKey = 3;
+ */
+ public Builder setIdentityKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000010;
+ identityKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes identityKey = 3;
+ */
+ public Builder clearIdentityKey() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ identityKey_ = getDefaultInstance().getIdentityKey();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes message = 4;
+ private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes message = 4;
+ *
+ *
+ * SignalMessage
+ *
+ */
+ public boolean hasMessage() {
+ return ((bitField0_ & 0x00000020) == 0x00000020);
+ }
+ /**
+ * optional bytes message = 4;
+ *
+ *
+ * SignalMessage
+ *
+ */
+ public com.google.protobuf.ByteString getMessage() {
+ return message_;
+ }
+ /**
+ * optional bytes message = 4;
+ *
+ *
+ * SignalMessage
+ *
+ */
+ public Builder setMessage(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000020;
+ message_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes message = 4;
+ *
+ *
+ * SignalMessage
+ *
+ */
+ public Builder clearMessage() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ message_ = getDefaultInstance().getMessage();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.PreKeySignalMessage)
+ }
+
+ static {
+ defaultInstance = new PreKeySignalMessage(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.PreKeySignalMessage)
+ }
+
+ public interface KeyExchangeMessageOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional uint32 id = 1;
+ /**
+ * optional uint32 id = 1;
+ */
+ boolean hasId();
+ /**
+ * optional uint32 id = 1;
+ */
+ int getId();
+
+ // optional bytes baseKey = 2;
+ /**
+ * optional bytes baseKey = 2;
+ */
+ boolean hasBaseKey();
+ /**
+ * optional bytes baseKey = 2;
+ */
+ com.google.protobuf.ByteString getBaseKey();
+
+ // optional bytes ratchetKey = 3;
+ /**
+ * optional bytes ratchetKey = 3;
+ */
+ boolean hasRatchetKey();
+ /**
+ * optional bytes ratchetKey = 3;
+ */
+ com.google.protobuf.ByteString getRatchetKey();
+
+ // optional bytes identityKey = 4;
+ /**
+ * optional bytes identityKey = 4;
+ */
+ boolean hasIdentityKey();
+ /**
+ * optional bytes identityKey = 4;
+ */
+ com.google.protobuf.ByteString getIdentityKey();
+
+ // optional bytes baseKeySignature = 5;
+ /**
+ * optional bytes baseKeySignature = 5;
+ */
+ boolean hasBaseKeySignature();
+ /**
+ * optional bytes baseKeySignature = 5;
+ */
+ com.google.protobuf.ByteString getBaseKeySignature();
+ }
+ /**
+ * Protobuf type {@code textsecure.KeyExchangeMessage}
+ */
+ public static final class KeyExchangeMessage extends
+ com.google.protobuf.GeneratedMessage
+ implements KeyExchangeMessageOrBuilder {
+ // Use KeyExchangeMessage.newBuilder() to construct.
+ private KeyExchangeMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private KeyExchangeMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final KeyExchangeMessage defaultInstance;
+ public static KeyExchangeMessage getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public KeyExchangeMessage getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @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 {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ id_ = input.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;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_KeyExchangeMessage_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_KeyExchangeMessage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage.class, org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional uint32 id = 1;
+ */
+ public boolean hasId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public int getId() {
+ return id_;
+ }
+
+ // optional bytes baseKey = 2;
+ public static final int BASEKEY_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString baseKey_;
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public boolean hasBaseKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public com.google.protobuf.ByteString getBaseKey() {
+ return baseKey_;
+ }
+
+ // optional bytes ratchetKey = 3;
+ public static final int RATCHETKEY_FIELD_NUMBER = 3;
+ private com.google.protobuf.ByteString ratchetKey_;
+ /**
+ * optional bytes ratchetKey = 3;
+ */
+ public boolean hasRatchetKey() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes ratchetKey = 3;
+ */
+ public com.google.protobuf.ByteString getRatchetKey() {
+ return ratchetKey_;
+ }
+
+ // optional bytes identityKey = 4;
+ public static final int IDENTITYKEY_FIELD_NUMBER = 4;
+ private com.google.protobuf.ByteString identityKey_;
+ /**
+ * optional bytes identityKey = 4;
+ */
+ public boolean hasIdentityKey() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional bytes identityKey = 4;
+ */
+ public com.google.protobuf.ByteString getIdentityKey() {
+ return identityKey_;
+ }
+
+ // optional bytes baseKeySignature = 5;
+ public static final int BASEKEYSIGNATURE_FIELD_NUMBER = 5;
+ private com.google.protobuf.ByteString baseKeySignature_;
+ /**
+ * optional bytes baseKeySignature = 5;
+ */
+ public boolean hasBaseKeySignature() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * optional bytes baseKeySignature = 5;
+ */
+ public com.google.protobuf.ByteString getBaseKeySignature() {
+ return baseKeySignature_;
+ }
+
+ private void initFields() {
+ id_ = 0;
+ baseKey_ = com.google.protobuf.ByteString.EMPTY;
+ ratchetKey_ = com.google.protobuf.ByteString.EMPTY;
+ identityKey_ = com.google.protobuf.ByteString.EMPTY;
+ baseKeySignature_ = com.google.protobuf.ByteString.EMPTY;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeUInt32(1, id_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, baseKey_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeBytes(3, ratchetKey_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ output.writeBytes(4, identityKey_);
+ }
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ output.writeBytes(5, baseKeySignature_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, id_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, baseKey_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(3, ratchetKey_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(4, identityKey_);
+ }
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(5, baseKeySignature_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.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.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.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.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.protocol.SignalProtos.KeyExchangeMessage prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.KeyExchangeMessage}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional uint32 id = 1;
+ */
+ public boolean hasId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public int getId() {
+ return id_;
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public Builder setId(int value) {
+ bitField0_ |= 0x00000001;
+ id_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public Builder clearId() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ id_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional bytes baseKey = 2;
+ private com.google.protobuf.ByteString baseKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public boolean hasBaseKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public com.google.protobuf.ByteString getBaseKey() {
+ return baseKey_;
+ }
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public Builder setBaseKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ baseKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public Builder clearBaseKey() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ baseKey_ = getDefaultInstance().getBaseKey();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes ratchetKey = 3;
+ private com.google.protobuf.ByteString ratchetKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes ratchetKey = 3;
+ */
+ public boolean hasRatchetKey() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes ratchetKey = 3;
+ */
+ public com.google.protobuf.ByteString getRatchetKey() {
+ return ratchetKey_;
+ }
+ /**
+ * optional bytes ratchetKey = 3;
+ */
+ public Builder setRatchetKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ ratchetKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes ratchetKey = 3;
+ */
+ public Builder clearRatchetKey() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ ratchetKey_ = getDefaultInstance().getRatchetKey();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes identityKey = 4;
+ private com.google.protobuf.ByteString identityKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes identityKey = 4;
+ */
+ public boolean hasIdentityKey() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional bytes identityKey = 4;
+ */
+ public com.google.protobuf.ByteString getIdentityKey() {
+ return identityKey_;
+ }
+ /**
+ * optional bytes identityKey = 4;
+ */
+ public Builder setIdentityKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000008;
+ identityKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes identityKey = 4;
+ */
+ public Builder clearIdentityKey() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ identityKey_ = getDefaultInstance().getIdentityKey();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes baseKeySignature = 5;
+ private com.google.protobuf.ByteString baseKeySignature_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes baseKeySignature = 5;
+ */
+ public boolean hasBaseKeySignature() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * optional bytes baseKeySignature = 5;
+ */
+ public com.google.protobuf.ByteString getBaseKeySignature() {
+ return baseKeySignature_;
+ }
+ /**
+ * optional bytes baseKeySignature = 5;
+ */
+ public Builder setBaseKeySignature(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000010;
+ baseKeySignature_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes baseKeySignature = 5;
+ */
+ public Builder clearBaseKeySignature() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ baseKeySignature_ = getDefaultInstance().getBaseKeySignature();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.KeyExchangeMessage)
+ }
+
+ static {
+ defaultInstance = new KeyExchangeMessage(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.KeyExchangeMessage)
+ }
+
+ public interface SenderKeyMessageOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional uint32 id = 1;
+ /**
+ * optional uint32 id = 1;
+ */
+ boolean hasId();
+ /**
+ * optional uint32 id = 1;
+ */
+ int getId();
+
+ // optional uint32 iteration = 2;
+ /**
+ * optional uint32 iteration = 2;
+ */
+ boolean hasIteration();
+ /**
+ * optional uint32 iteration = 2;
+ */
+ int getIteration();
+
+ // optional bytes ciphertext = 3;
+ /**
+ * optional bytes ciphertext = 3;
+ */
+ boolean hasCiphertext();
+ /**
+ * optional bytes ciphertext = 3;
+ */
+ com.google.protobuf.ByteString getCiphertext();
+ }
+ /**
+ * Protobuf type {@code textsecure.SenderKeyMessage}
+ */
+ public static final class SenderKeyMessage extends
+ com.google.protobuf.GeneratedMessage
+ implements SenderKeyMessageOrBuilder {
+ // Use SenderKeyMessage.newBuilder() to construct.
+ private SenderKeyMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private SenderKeyMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final SenderKeyMessage defaultInstance;
+ public static SenderKeyMessage getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public SenderKeyMessage getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @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 {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ id_ = input.readUInt32();
+ break;
+ }
+ case 16: {
+ bitField0_ |= 0x00000002;
+ iteration_ = input.readUInt32();
+ break;
+ }
+ case 26: {
+ bitField0_ |= 0x00000004;
+ ciphertext_ = input.readBytes();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyMessage_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyMessage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage.class, org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional uint32 id = 1;
+ */
+ public boolean hasId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public int getId() {
+ return id_;
+ }
+
+ // optional uint32 iteration = 2;
+ public static final int ITERATION_FIELD_NUMBER = 2;
+ private int iteration_;
+ /**
+ * optional uint32 iteration = 2;
+ */
+ public boolean hasIteration() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional uint32 iteration = 2;
+ */
+ public int getIteration() {
+ return iteration_;
+ }
+
+ // optional bytes ciphertext = 3;
+ public static final int CIPHERTEXT_FIELD_NUMBER = 3;
+ private com.google.protobuf.ByteString ciphertext_;
+ /**
+ * optional bytes ciphertext = 3;
+ */
+ public boolean hasCiphertext() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes ciphertext = 3;
+ */
+ public com.google.protobuf.ByteString getCiphertext() {
+ return ciphertext_;
+ }
+
+ private void initFields() {
+ id_ = 0;
+ iteration_ = 0;
+ ciphertext_ = com.google.protobuf.ByteString.EMPTY;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeUInt32(1, id_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeUInt32(2, iteration_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeBytes(3, ciphertext_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, id_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(2, iteration_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(3, ciphertext_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.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.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.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.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyMessage prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.SenderKeyMessage}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional uint32 id = 1;
+ */
+ public boolean hasId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public int getId() {
+ return id_;
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public Builder setId(int value) {
+ bitField0_ |= 0x00000001;
+ id_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public Builder clearId() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ id_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional uint32 iteration = 2;
+ private int iteration_ ;
+ /**
+ * optional uint32 iteration = 2;
+ */
+ public boolean hasIteration() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional uint32 iteration = 2;
+ */
+ public int getIteration() {
+ return iteration_;
+ }
+ /**
+ * optional uint32 iteration = 2;
+ */
+ public Builder setIteration(int value) {
+ bitField0_ |= 0x00000002;
+ iteration_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 iteration = 2;
+ */
+ public Builder clearIteration() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ iteration_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional bytes ciphertext = 3;
+ private com.google.protobuf.ByteString ciphertext_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes ciphertext = 3;
+ */
+ public boolean hasCiphertext() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes ciphertext = 3;
+ */
+ public com.google.protobuf.ByteString getCiphertext() {
+ return ciphertext_;
+ }
+ /**
+ * optional bytes ciphertext = 3;
+ */
+ public Builder setCiphertext(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ ciphertext_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes ciphertext = 3;
+ */
+ public Builder clearCiphertext() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ ciphertext_ = getDefaultInstance().getCiphertext();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.SenderKeyMessage)
+ }
+
+ static {
+ defaultInstance = new SenderKeyMessage(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.SenderKeyMessage)
+ }
+
+ public interface SenderKeyDistributionMessageOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional uint32 id = 1;
+ /**
+ * optional uint32 id = 1;
+ */
+ boolean hasId();
+ /**
+ * optional uint32 id = 1;
+ */
+ int getId();
+
+ // optional uint32 iteration = 2;
+ /**
+ * optional uint32 iteration = 2;
+ */
+ boolean hasIteration();
+ /**
+ * optional uint32 iteration = 2;
+ */
+ int getIteration();
+
+ // optional bytes chainKey = 3;
+ /**
+ * optional bytes chainKey = 3;
+ */
+ boolean hasChainKey();
+ /**
+ * optional bytes chainKey = 3;
+ */
+ com.google.protobuf.ByteString getChainKey();
+
+ // optional bytes signingKey = 4;
+ /**
+ * optional bytes signingKey = 4;
+ */
+ boolean hasSigningKey();
+ /**
+ * optional bytes signingKey = 4;
+ */
+ com.google.protobuf.ByteString getSigningKey();
+ }
+ /**
+ * Protobuf type {@code textsecure.SenderKeyDistributionMessage}
+ */
+ public static final class SenderKeyDistributionMessage extends
+ com.google.protobuf.GeneratedMessage
+ implements SenderKeyDistributionMessageOrBuilder {
+ // Use SenderKeyDistributionMessage.newBuilder() to construct.
+ private SenderKeyDistributionMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private SenderKeyDistributionMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final SenderKeyDistributionMessage defaultInstance;
+ public static SenderKeyDistributionMessage getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public SenderKeyDistributionMessage getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @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 {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ id_ = input.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;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyDistributionMessage_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_SenderKeyDistributionMessage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage.class, org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional uint32 id = 1;
+ */
+ public boolean hasId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public int getId() {
+ return id_;
+ }
+
+ // optional uint32 iteration = 2;
+ public static final int ITERATION_FIELD_NUMBER = 2;
+ private int iteration_;
+ /**
+ * optional uint32 iteration = 2;
+ */
+ public boolean hasIteration() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional uint32 iteration = 2;
+ */
+ public int getIteration() {
+ return iteration_;
+ }
+
+ // optional bytes chainKey = 3;
+ public static final int CHAINKEY_FIELD_NUMBER = 3;
+ private com.google.protobuf.ByteString chainKey_;
+ /**
+ * optional bytes chainKey = 3;
+ */
+ public boolean hasChainKey() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes chainKey = 3;
+ */
+ public com.google.protobuf.ByteString getChainKey() {
+ return chainKey_;
+ }
+
+ // optional bytes signingKey = 4;
+ public static final int SIGNINGKEY_FIELD_NUMBER = 4;
+ private com.google.protobuf.ByteString signingKey_;
+ /**
+ * optional bytes signingKey = 4;
+ */
+ public boolean hasSigningKey() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional bytes signingKey = 4;
+ */
+ public com.google.protobuf.ByteString getSigningKey() {
+ return signingKey_;
+ }
+
+ private void initFields() {
+ id_ = 0;
+ iteration_ = 0;
+ chainKey_ = com.google.protobuf.ByteString.EMPTY;
+ signingKey_ = com.google.protobuf.ByteString.EMPTY;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeUInt32(1, id_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeUInt32(2, iteration_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeBytes(3, chainKey_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ output.writeBytes(4, signingKey_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, id_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(2, iteration_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(3, chainKey_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(4, signingKey_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.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.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.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.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.protocol.SignalProtos.SenderKeyDistributionMessage prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.SenderKeyDistributionMessage}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional uint32 id = 1;
+ */
+ public boolean hasId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public int getId() {
+ return id_;
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public Builder setId(int value) {
+ bitField0_ |= 0x00000001;
+ id_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public Builder clearId() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ id_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional uint32 iteration = 2;
+ private int iteration_ ;
+ /**
+ * optional uint32 iteration = 2;
+ */
+ public boolean hasIteration() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional uint32 iteration = 2;
+ */
+ public int getIteration() {
+ return iteration_;
+ }
+ /**
+ * optional uint32 iteration = 2;
+ */
+ public Builder setIteration(int value) {
+ bitField0_ |= 0x00000002;
+ iteration_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 iteration = 2;
+ */
+ public Builder clearIteration() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ iteration_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional bytes chainKey = 3;
+ private com.google.protobuf.ByteString chainKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes chainKey = 3;
+ */
+ public boolean hasChainKey() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes chainKey = 3;
+ */
+ public com.google.protobuf.ByteString getChainKey() {
+ return chainKey_;
+ }
+ /**
+ * optional bytes chainKey = 3;
+ */
+ public Builder setChainKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ chainKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes chainKey = 3;
+ */
+ public Builder clearChainKey() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ chainKey_ = getDefaultInstance().getChainKey();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes signingKey = 4;
+ private com.google.protobuf.ByteString signingKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes signingKey = 4;
+ */
+ public boolean hasSigningKey() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional bytes signingKey = 4;
+ */
+ public com.google.protobuf.ByteString getSigningKey() {
+ return signingKey_;
+ }
+ /**
+ * optional bytes signingKey = 4;
+ */
+ public Builder setSigningKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000008;
+ signingKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes signingKey = 4;
+ */
+ public Builder clearSigningKey() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ signingKey_ = getDefaultInstance().getSigningKey();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.SenderKeyDistributionMessage)
+ }
+
+ static {
+ defaultInstance = new SenderKeyDistributionMessage(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.SenderKeyDistributionMessage)
+ }
+
+ public interface DeviceConsistencyCodeMessageOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional uint32 generation = 1;
+ /**
+ * optional uint32 generation = 1;
+ */
+ boolean hasGeneration();
+ /**
+ * optional uint32 generation = 1;
+ */
+ int getGeneration();
+
+ // optional bytes signature = 2;
+ /**
+ * optional bytes signature = 2;
+ */
+ boolean hasSignature();
+ /**
+ * optional bytes signature = 2;
+ */
+ com.google.protobuf.ByteString getSignature();
+ }
+ /**
+ * Protobuf type {@code textsecure.DeviceConsistencyCodeMessage}
+ */
+ public static final class DeviceConsistencyCodeMessage extends
+ com.google.protobuf.GeneratedMessage
+ implements DeviceConsistencyCodeMessageOrBuilder {
+ // Use DeviceConsistencyCodeMessage.newBuilder() to construct.
+ private DeviceConsistencyCodeMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private DeviceConsistencyCodeMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final DeviceConsistencyCodeMessage defaultInstance;
+ public static DeviceConsistencyCodeMessage getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public DeviceConsistencyCodeMessage getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @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 {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ generation_ = input.readUInt32();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ signature_ = input.readBytes();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_DeviceConsistencyCodeMessage_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_DeviceConsistencyCodeMessage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage.class, org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional uint32 generation = 1;
+ */
+ public boolean hasGeneration() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 generation = 1;
+ */
+ public int getGeneration() {
+ return generation_;
+ }
+
+ // optional bytes signature = 2;
+ public static final int SIGNATURE_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString signature_;
+ /**
+ * optional bytes signature = 2;
+ */
+ public boolean hasSignature() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes signature = 2;
+ */
+ public com.google.protobuf.ByteString getSignature() {
+ return signature_;
+ }
+
+ private void initFields() {
+ generation_ = 0;
+ signature_ = com.google.protobuf.ByteString.EMPTY;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeUInt32(1, generation_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, signature_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, generation_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, signature_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.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.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.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.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.protocol.SignalProtos.DeviceConsistencyCodeMessage prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.DeviceConsistencyCodeMessage}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional uint32 generation = 1;
+ */
+ public boolean hasGeneration() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 generation = 1;
+ */
+ public int getGeneration() {
+ return generation_;
+ }
+ /**
+ * optional uint32 generation = 1;
+ */
+ public Builder setGeneration(int value) {
+ bitField0_ |= 0x00000001;
+ generation_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 generation = 1;
+ */
+ public Builder clearGeneration() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ generation_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional bytes signature = 2;
+ private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes signature = 2;
+ */
+ public boolean hasSignature() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes signature = 2;
+ */
+ public com.google.protobuf.ByteString getSignature() {
+ return signature_;
+ }
+ /**
+ * optional bytes signature = 2;
+ */
+ public Builder setSignature(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ signature_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes signature = 2;
+ */
+ public Builder clearSignature() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ signature_ = getDefaultInstance().getSignature();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.DeviceConsistencyCodeMessage)
+ }
+
+ static {
+ defaultInstance = new DeviceConsistencyCodeMessage(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.DeviceConsistencyCodeMessage)
+ }
+
+ public interface ClosedGroupCiphertextMessageOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional bytes ciphertext = 1;
+ /**
+ * optional bytes ciphertext = 1;
+ *
+ *
+ * @required
+ *
+ */
+ boolean hasCiphertext();
+ /**
+ * optional bytes ciphertext = 1;
+ *
+ *
+ * @required
+ *
+ */
+ com.google.protobuf.ByteString getCiphertext();
+
+ // optional bytes senderPublicKey = 2;
+ /**
+ * optional bytes senderPublicKey = 2;
+ *
+ *
+ * @required
+ *
+ */
+ boolean hasSenderPublicKey();
+ /**
+ * optional bytes senderPublicKey = 2;
+ *
+ *
+ * @required
+ *
+ */
+ com.google.protobuf.ByteString getSenderPublicKey();
+
+ // optional uint32 keyIndex = 3;
+ /**
+ * optional uint32 keyIndex = 3;
+ *
+ *
+ * @required
+ *
+ */
+ boolean hasKeyIndex();
+ /**
+ * optional uint32 keyIndex = 3;
+ *
+ *
+ * @required
+ *
+ */
+ int getKeyIndex();
+ }
+ /**
+ * Protobuf type {@code textsecure.ClosedGroupCiphertextMessage}
+ */
+ public static final class ClosedGroupCiphertextMessage extends
+ com.google.protobuf.GeneratedMessage
+ implements ClosedGroupCiphertextMessageOrBuilder {
+ // Use ClosedGroupCiphertextMessage.newBuilder() to construct.
+ private ClosedGroupCiphertextMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private ClosedGroupCiphertextMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final ClosedGroupCiphertextMessage defaultInstance;
+ public static ClosedGroupCiphertextMessage getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public ClosedGroupCiphertextMessage getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private ClosedGroupCiphertextMessage(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ bitField0_ |= 0x00000001;
+ ciphertext_ = input.readBytes();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ senderPublicKey_ = input.readBytes();
+ break;
+ }
+ case 24: {
+ bitField0_ |= 0x00000004;
+ keyIndex_ = input.readUInt32();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_ClosedGroupCiphertextMessage_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.protocol.SignalProtos.internal_static_textsecure_ClosedGroupCiphertextMessage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage.class, org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional bytes ciphertext = 1;
+ *
+ *
+ * @required
+ *
+ */
+ public boolean hasCiphertext() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional bytes ciphertext = 1;
+ *
+ *
+ * @required
+ *
+ */
+ public com.google.protobuf.ByteString getCiphertext() {
+ return ciphertext_;
+ }
+
+ // optional bytes senderPublicKey = 2;
+ public static final int SENDERPUBLICKEY_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString senderPublicKey_;
+ /**
+ * optional bytes senderPublicKey = 2;
+ *
+ *
+ * @required
+ *
+ */
+ public boolean hasSenderPublicKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes senderPublicKey = 2;
+ *
+ *
+ * @required
+ *
+ */
+ public com.google.protobuf.ByteString getSenderPublicKey() {
+ return senderPublicKey_;
+ }
+
+ // optional uint32 keyIndex = 3;
+ public static final int KEYINDEX_FIELD_NUMBER = 3;
+ private int keyIndex_;
+ /**
+ * optional uint32 keyIndex = 3;
+ *
+ *
+ * @required
+ *
+ */
+ public boolean hasKeyIndex() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional uint32 keyIndex = 3;
+ *
+ *
+ * @required
+ *
+ */
+ public int getKeyIndex() {
+ return keyIndex_;
+ }
+
+ private void initFields() {
+ ciphertext_ = com.google.protobuf.ByteString.EMPTY;
+ senderPublicKey_ = com.google.protobuf.ByteString.EMPTY;
+ keyIndex_ = 0;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeBytes(1, ciphertext_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, senderPublicKey_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeUInt32(3, keyIndex_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(1, ciphertext_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, senderPublicKey_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(3, keyIndex_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.protocol.SignalProtos.ClosedGroupCiphertextMessage prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.ClosedGroupCiphertextMessage}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional bytes ciphertext = 1;
+ *
+ *
+ * @required
+ *
+ */
+ public boolean hasCiphertext() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional bytes ciphertext = 1;
+ *
+ *
+ * @required
+ *
+ */
+ public com.google.protobuf.ByteString getCiphertext() {
+ return ciphertext_;
+ }
+ /**
+ * optional bytes ciphertext = 1;
+ *
+ *
+ * @required
+ *
+ */
+ public Builder setCiphertext(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ ciphertext_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes ciphertext = 1;
+ *
+ *
+ * @required
+ *
+ */
+ public Builder clearCiphertext() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ ciphertext_ = getDefaultInstance().getCiphertext();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes senderPublicKey = 2;
+ private com.google.protobuf.ByteString senderPublicKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes senderPublicKey = 2;
+ *
+ *
+ * @required
+ *
+ */
+ public boolean hasSenderPublicKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes senderPublicKey = 2;
+ *
+ *
+ * @required
+ *
+ */
+ public com.google.protobuf.ByteString getSenderPublicKey() {
+ return senderPublicKey_;
+ }
+ /**
+ * optional bytes senderPublicKey = 2;
+ *
+ *
+ * @required
+ *
+ */
+ public Builder setSenderPublicKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ senderPublicKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes senderPublicKey = 2;
+ *
+ *
+ * @required
+ *
+ */
+ public Builder clearSenderPublicKey() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ senderPublicKey_ = getDefaultInstance().getSenderPublicKey();
+ onChanged();
+ return this;
+ }
+
+ // optional uint32 keyIndex = 3;
+ private int keyIndex_ ;
+ /**
+ * optional uint32 keyIndex = 3;
+ *
+ *
+ * @required
+ *
+ */
+ public boolean hasKeyIndex() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional uint32 keyIndex = 3;
+ *
+ *
+ * @required
+ *
+ */
+ public int getKeyIndex() {
+ return keyIndex_;
+ }
+ /**
+ * optional uint32 keyIndex = 3;
+ *
+ *
+ * @required
+ *
+ */
+ public Builder setKeyIndex(int value) {
+ bitField0_ |= 0x00000004;
+ keyIndex_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 keyIndex = 3;
+ *
+ *
+ * @required
+ *
+ */
+ public Builder clearKeyIndex() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ keyIndex_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.ClosedGroupCiphertextMessage)
+ }
+
+ static {
+ defaultInstance = new ClosedGroupCiphertextMessage(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.ClosedGroupCiphertextMessage)
+ }
+
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_textsecure_SignalMessage_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_textsecure_SignalMessage_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_textsecure_PreKeySignalMessage_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_textsecure_PreKeySignalMessage_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_textsecure_KeyExchangeMessage_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_textsecure_KeyExchangeMessage_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_textsecure_SenderKeyMessage_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_textsecure_SenderKeyMessage_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_textsecure_SenderKeyDistributionMessage_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_textsecure_SenderKeyDistributionMessage_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_textsecure_DeviceConsistencyCodeMessage_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_textsecure_DeviceConsistencyCodeMessage_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_textsecure_ClosedGroupCiphertextMessage_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_textsecure_ClosedGroupCiphertextMessage_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ 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(\014\"]\n\034ClosedGroupCiphertextMessage\022\022\n\n" +
+ "ciphertext\030\001 \001(\014\022\027\n\017senderPublicKey\030\002 \001(" +
+ "\014\022\020\n\010keyIndex\030\003 \001(\rB5\n%org.whispersystem" +
+ "s.libsignal.protocolB\014SignalProtos"
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+ new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
+ com.google.protobuf.Descriptors.FileDescriptor root) {
+ descriptor = root;
+ internal_static_textsecure_SignalMessage_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_textsecure_SignalMessage_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_textsecure_SignalMessage_descriptor,
+ new String[] { "RatchetKey", "Counter", "PreviousCounter", "Ciphertext", });
+ internal_static_textsecure_PreKeySignalMessage_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_textsecure_PreKeySignalMessage_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_textsecure_PreKeySignalMessage_descriptor,
+ new 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.GeneratedMessage.FieldAccessorTable(
+ internal_static_textsecure_KeyExchangeMessage_descriptor,
+ new String[] { "Id", "BaseKey", "RatchetKey", "IdentityKey", "BaseKeySignature", });
+ internal_static_textsecure_SenderKeyMessage_descriptor =
+ getDescriptor().getMessageTypes().get(3);
+ internal_static_textsecure_SenderKeyMessage_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_textsecure_SenderKeyMessage_descriptor,
+ new String[] { "Id", "Iteration", "Ciphertext", });
+ internal_static_textsecure_SenderKeyDistributionMessage_descriptor =
+ getDescriptor().getMessageTypes().get(4);
+ internal_static_textsecure_SenderKeyDistributionMessage_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_textsecure_SenderKeyDistributionMessage_descriptor,
+ new String[] { "Id", "Iteration", "ChainKey", "SigningKey", });
+ internal_static_textsecure_DeviceConsistencyCodeMessage_descriptor =
+ getDescriptor().getMessageTypes().get(5);
+ internal_static_textsecure_DeviceConsistencyCodeMessage_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_textsecure_DeviceConsistencyCodeMessage_descriptor,
+ new String[] { "Generation", "Signature", });
+ internal_static_textsecure_ClosedGroupCiphertextMessage_descriptor =
+ getDescriptor().getMessageTypes().get(6);
+ internal_static_textsecure_ClosedGroupCiphertextMessage_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_textsecure_ClosedGroupCiphertextMessage_descriptor,
+ new String[] { "Ciphertext", "SenderPublicKey", "KeyIndex", });
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ }, assigner);
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/libsignal/src/main/java/org/session/libsignal/libsignal/ratchet/AliceSignalProtocolParameters.java b/libsignal/src/main/java/org/session/libsignal/libsignal/ratchet/AliceSignalProtocolParameters.java
new file mode 100644
index 0000000000..7dad4c76cf
--- /dev/null
+++ b/libsignal/src/main/java/org/session/libsignal/libsignal/ratchet/AliceSignalProtocolParameters.java
@@ -0,0 +1,114 @@
+/**
+ * Copyright (C) 2014-2016 Open Whisper Systems
+ *
+ * Licensed according to the LICENSE file in this repository.
+ */
+package org.session.libsignal.libsignal.ratchet;
+
+import org.session.libsignal.libsignal.IdentityKey;
+import org.session.libsignal.libsignal.IdentityKeyPair;
+import org.session.libsignal.libsignal.ecc.ECKeyPair;
+import org.session.libsignal.libsignal.ecc.ECPublicKey;
+import org.session.libsignal.libsignal.util.guava.Optional;
+
+public class AliceSignalProtocolParameters {
+
+ private final IdentityKeyPair ourIdentityKey;
+ private final ECKeyPair ourBaseKey;
+
+ private final IdentityKey theirIdentityKey;
+ private final ECPublicKey theirSignedPreKey;
+ private final Optionaloptional uint32 sessionVersion = 1;
+ */
+ boolean hasSessionVersion();
+ /**
+ * optional uint32 sessionVersion = 1;
+ */
+ int getSessionVersion();
+
+ // optional bytes localIdentityPublic = 2;
+ /**
+ * optional bytes localIdentityPublic = 2;
+ */
+ boolean hasLocalIdentityPublic();
+ /**
+ * optional bytes localIdentityPublic = 2;
+ */
+ com.google.protobuf.ByteString getLocalIdentityPublic();
+
+ // optional bytes remoteIdentityPublic = 3;
+ /**
+ * optional bytes remoteIdentityPublic = 3;
+ */
+ boolean hasRemoteIdentityPublic();
+ /**
+ * optional bytes remoteIdentityPublic = 3;
+ */
+ com.google.protobuf.ByteString getRemoteIdentityPublic();
+
+ // optional bytes rootKey = 4;
+ /**
+ * optional bytes rootKey = 4;
+ */
+ boolean hasRootKey();
+ /**
+ * optional bytes rootKey = 4;
+ */
+ com.google.protobuf.ByteString getRootKey();
+
+ // optional uint32 previousCounter = 5;
+ /**
+ * optional uint32 previousCounter = 5;
+ */
+ boolean hasPreviousCounter();
+ /**
+ * optional uint32 previousCounter = 5;
+ */
+ int getPreviousCounter();
+
+ // optional .textsecure.SessionStructure.Chain senderChain = 6;
+ /**
+ * optional .textsecure.SessionStructure.Chain senderChain = 6;
+ */
+ boolean hasSenderChain();
+ /**
+ * optional .textsecure.SessionStructure.Chain senderChain = 6;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain getSenderChain();
+ /**
+ * optional .textsecure.SessionStructure.Chain senderChain = 6;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.ChainOrBuilder getSenderChainOrBuilder();
+
+ // repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ java.util.Listrepeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain getReceiverChains(int index);
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ int getReceiverChainsCount();
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ java.util.List extends org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.ChainOrBuilder>
+ getReceiverChainsOrBuilderList();
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.ChainOrBuilder getReceiverChainsOrBuilder(
+ int index);
+
+ // optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ /**
+ * optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ */
+ boolean hasPendingKeyExchange();
+ /**
+ * optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange getPendingKeyExchange();
+ /**
+ * optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchangeOrBuilder getPendingKeyExchangeOrBuilder();
+
+ // optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ /**
+ * optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ */
+ boolean hasPendingPreKey();
+ /**
+ * optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey getPendingPreKey();
+ /**
+ * optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKeyOrBuilder getPendingPreKeyOrBuilder();
+
+ // optional uint32 remoteRegistrationId = 10;
+ /**
+ * optional uint32 remoteRegistrationId = 10;
+ */
+ boolean hasRemoteRegistrationId();
+ /**
+ * optional uint32 remoteRegistrationId = 10;
+ */
+ int getRemoteRegistrationId();
+
+ // optional uint32 localRegistrationId = 11;
+ /**
+ * optional uint32 localRegistrationId = 11;
+ */
+ boolean hasLocalRegistrationId();
+ /**
+ * optional uint32 localRegistrationId = 11;
+ */
+ int getLocalRegistrationId();
+
+ // optional bool needsRefresh = 12;
+ /**
+ * optional bool needsRefresh = 12;
+ */
+ boolean hasNeedsRefresh();
+ /**
+ * optional bool needsRefresh = 12;
+ */
+ boolean getNeedsRefresh();
+
+ // optional bytes aliceBaseKey = 13;
+ /**
+ * optional bytes aliceBaseKey = 13;
+ */
+ boolean hasAliceBaseKey();
+ /**
+ * optional bytes aliceBaseKey = 13;
+ */
+ com.google.protobuf.ByteString getAliceBaseKey();
+ }
+ /**
+ * Protobuf type {@code textsecure.SessionStructure}
+ */
+ public static final class SessionStructure extends
+ com.google.protobuf.GeneratedMessage
+ implements SessionStructureOrBuilder {
+ // Use SessionStructure.newBuilder() to construct.
+ private SessionStructure(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private SessionStructure(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final SessionStructure defaultInstance;
+ public static SessionStructure getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public SessionStructure getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private SessionStructure(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ sessionVersion_ = input.readUInt32();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ localIdentityPublic_ = input.readBytes();
+ break;
+ }
+ case 26: {
+ bitField0_ |= 0x00000004;
+ remoteIdentityPublic_ = input.readBytes();
+ break;
+ }
+ case 34: {
+ bitField0_ |= 0x00000008;
+ rootKey_ = input.readBytes();
+ break;
+ }
+ case 40: {
+ bitField0_ |= 0x00000010;
+ previousCounter_ = input.readUInt32();
+ break;
+ }
+ case 50: {
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000020) == 0x00000020)) {
+ subBuilder = senderChain_.toBuilder();
+ }
+ senderChain_ = input.readMessage(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(senderChain_);
+ senderChain_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000020;
+ break;
+ }
+ case 58: {
+ if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
+ receiverChains_ = new java.util.ArrayListoptional bytes senderRatchetKey = 1;
+ */
+ boolean hasSenderRatchetKey();
+ /**
+ * optional bytes senderRatchetKey = 1;
+ */
+ com.google.protobuf.ByteString getSenderRatchetKey();
+
+ // optional bytes senderRatchetKeyPrivate = 2;
+ /**
+ * optional bytes senderRatchetKeyPrivate = 2;
+ */
+ boolean hasSenderRatchetKeyPrivate();
+ /**
+ * optional bytes senderRatchetKeyPrivate = 2;
+ */
+ com.google.protobuf.ByteString getSenderRatchetKeyPrivate();
+
+ // optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ /**
+ * optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ */
+ boolean hasChainKey();
+ /**
+ * optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey getChainKey();
+ /**
+ * optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKeyOrBuilder getChainKeyOrBuilder();
+
+ // repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ java.util.Listrepeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey getMessageKeys(int index);
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ int getMessageKeysCount();
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ java.util.List extends org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKeyOrBuilder>
+ getMessageKeysOrBuilderList();
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKeyOrBuilder getMessageKeysOrBuilder(
+ int index);
+ }
+ /**
+ * Protobuf type {@code textsecure.SessionStructure.Chain}
+ */
+ public static final class Chain extends
+ com.google.protobuf.GeneratedMessage
+ implements ChainOrBuilder {
+ // Use Chain.newBuilder() to construct.
+ private Chain(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private Chain(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final Chain defaultInstance;
+ public static Chain getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public Chain getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Chain(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ bitField0_ |= 0x00000001;
+ senderRatchetKey_ = input.readBytes();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ senderRatchetKeyPrivate_ = input.readBytes();
+ break;
+ }
+ case 26: {
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ subBuilder = chainKey_.toBuilder();
+ }
+ chainKey_ = input.readMessage(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(chainKey_);
+ chainKey_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000004;
+ break;
+ }
+ case 34: {
+ if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
+ messageKeys_ = new java.util.ArrayListoptional uint32 index = 1;
+ */
+ boolean hasIndex();
+ /**
+ * optional uint32 index = 1;
+ */
+ int getIndex();
+
+ // optional bytes key = 2;
+ /**
+ * optional bytes key = 2;
+ */
+ boolean hasKey();
+ /**
+ * optional bytes key = 2;
+ */
+ com.google.protobuf.ByteString getKey();
+ }
+ /**
+ * Protobuf type {@code textsecure.SessionStructure.Chain.ChainKey}
+ */
+ public static final class ChainKey extends
+ com.google.protobuf.GeneratedMessage
+ implements ChainKeyOrBuilder {
+ // Use ChainKey.newBuilder() to construct.
+ private ChainKey(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private ChainKey(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final ChainKey defaultInstance;
+ public static ChainKey getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public ChainKey getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private ChainKey(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ index_ = input.readUInt32();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ key_ = input.readBytes();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_SessionStructure_Chain_ChainKey_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_SessionStructure_Chain_ChainKey_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey.class, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional uint32 index = 1;
+ */
+ public boolean hasIndex() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 index = 1;
+ */
+ public int getIndex() {
+ return index_;
+ }
+
+ // optional bytes key = 2;
+ public static final int KEY_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString key_;
+ /**
+ * optional bytes key = 2;
+ */
+ public boolean hasKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes key = 2;
+ */
+ public com.google.protobuf.ByteString getKey() {
+ return key_;
+ }
+
+ private void initFields() {
+ index_ = 0;
+ key_ = com.google.protobuf.ByteString.EMPTY;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeUInt32(1, index_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, key_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, index_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, key_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.SessionStructure.Chain.ChainKey}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional uint32 index = 1;
+ */
+ public boolean hasIndex() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 index = 1;
+ */
+ public int getIndex() {
+ return index_;
+ }
+ /**
+ * optional uint32 index = 1;
+ */
+ public Builder setIndex(int value) {
+ bitField0_ |= 0x00000001;
+ index_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 index = 1;
+ */
+ public Builder clearIndex() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ index_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional bytes key = 2;
+ private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes key = 2;
+ */
+ public boolean hasKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes key = 2;
+ */
+ public com.google.protobuf.ByteString getKey() {
+ return key_;
+ }
+ /**
+ * optional bytes key = 2;
+ */
+ public Builder setKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ key_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes key = 2;
+ */
+ public Builder clearKey() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ key_ = getDefaultInstance().getKey();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.SessionStructure.Chain.ChainKey)
+ }
+
+ static {
+ defaultInstance = new ChainKey(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.SessionStructure.Chain.ChainKey)
+ }
+
+ public interface MessageKeyOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional uint32 index = 1;
+ /**
+ * optional uint32 index = 1;
+ */
+ boolean hasIndex();
+ /**
+ * optional uint32 index = 1;
+ */
+ int getIndex();
+
+ // optional bytes cipherKey = 2;
+ /**
+ * optional bytes cipherKey = 2;
+ */
+ boolean hasCipherKey();
+ /**
+ * optional bytes cipherKey = 2;
+ */
+ com.google.protobuf.ByteString getCipherKey();
+
+ // optional bytes macKey = 3;
+ /**
+ * optional bytes macKey = 3;
+ */
+ boolean hasMacKey();
+ /**
+ * optional bytes macKey = 3;
+ */
+ com.google.protobuf.ByteString getMacKey();
+
+ // optional bytes iv = 4;
+ /**
+ * optional bytes iv = 4;
+ */
+ boolean hasIv();
+ /**
+ * optional bytes iv = 4;
+ */
+ com.google.protobuf.ByteString getIv();
+ }
+ /**
+ * Protobuf type {@code textsecure.SessionStructure.Chain.MessageKey}
+ */
+ public static final class MessageKey extends
+ com.google.protobuf.GeneratedMessage
+ implements MessageKeyOrBuilder {
+ // Use MessageKey.newBuilder() to construct.
+ private MessageKey(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private MessageKey(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final MessageKey defaultInstance;
+ public static MessageKey getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public MessageKey getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private MessageKey(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ index_ = input.readUInt32();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ cipherKey_ = input.readBytes();
+ break;
+ }
+ case 26: {
+ bitField0_ |= 0x00000004;
+ macKey_ = input.readBytes();
+ break;
+ }
+ case 34: {
+ bitField0_ |= 0x00000008;
+ iv_ = input.readBytes();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_SessionStructure_Chain_MessageKey_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_SessionStructure_Chain_MessageKey_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey.class, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional uint32 index = 1;
+ */
+ public boolean hasIndex() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 index = 1;
+ */
+ public int getIndex() {
+ return index_;
+ }
+
+ // optional bytes cipherKey = 2;
+ public static final int CIPHERKEY_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString cipherKey_;
+ /**
+ * optional bytes cipherKey = 2;
+ */
+ public boolean hasCipherKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes cipherKey = 2;
+ */
+ public com.google.protobuf.ByteString getCipherKey() {
+ return cipherKey_;
+ }
+
+ // optional bytes macKey = 3;
+ public static final int MACKEY_FIELD_NUMBER = 3;
+ private com.google.protobuf.ByteString macKey_;
+ /**
+ * optional bytes macKey = 3;
+ */
+ public boolean hasMacKey() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes macKey = 3;
+ */
+ public com.google.protobuf.ByteString getMacKey() {
+ return macKey_;
+ }
+
+ // optional bytes iv = 4;
+ public static final int IV_FIELD_NUMBER = 4;
+ private com.google.protobuf.ByteString iv_;
+ /**
+ * optional bytes iv = 4;
+ */
+ public boolean hasIv() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional bytes iv = 4;
+ */
+ public com.google.protobuf.ByteString getIv() {
+ return iv_;
+ }
+
+ private void initFields() {
+ index_ = 0;
+ cipherKey_ = com.google.protobuf.ByteString.EMPTY;
+ macKey_ = com.google.protobuf.ByteString.EMPTY;
+ iv_ = com.google.protobuf.ByteString.EMPTY;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeUInt32(1, index_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, cipherKey_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeBytes(3, macKey_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ output.writeBytes(4, iv_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, index_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, cipherKey_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(3, macKey_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(4, iv_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.SessionStructure.Chain.MessageKey}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional uint32 index = 1;
+ */
+ public boolean hasIndex() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 index = 1;
+ */
+ public int getIndex() {
+ return index_;
+ }
+ /**
+ * optional uint32 index = 1;
+ */
+ public Builder setIndex(int value) {
+ bitField0_ |= 0x00000001;
+ index_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 index = 1;
+ */
+ public Builder clearIndex() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ index_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional bytes cipherKey = 2;
+ private com.google.protobuf.ByteString cipherKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes cipherKey = 2;
+ */
+ public boolean hasCipherKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes cipherKey = 2;
+ */
+ public com.google.protobuf.ByteString getCipherKey() {
+ return cipherKey_;
+ }
+ /**
+ * optional bytes cipherKey = 2;
+ */
+ public Builder setCipherKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ cipherKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes cipherKey = 2;
+ */
+ public Builder clearCipherKey() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ cipherKey_ = getDefaultInstance().getCipherKey();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes macKey = 3;
+ private com.google.protobuf.ByteString macKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes macKey = 3;
+ */
+ public boolean hasMacKey() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes macKey = 3;
+ */
+ public com.google.protobuf.ByteString getMacKey() {
+ return macKey_;
+ }
+ /**
+ * optional bytes macKey = 3;
+ */
+ public Builder setMacKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ macKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes macKey = 3;
+ */
+ public Builder clearMacKey() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ macKey_ = getDefaultInstance().getMacKey();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes iv = 4;
+ private com.google.protobuf.ByteString iv_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes iv = 4;
+ */
+ public boolean hasIv() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional bytes iv = 4;
+ */
+ public com.google.protobuf.ByteString getIv() {
+ return iv_;
+ }
+ /**
+ * optional bytes iv = 4;
+ */
+ public Builder setIv(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000008;
+ iv_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes iv = 4;
+ */
+ public Builder clearIv() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ iv_ = getDefaultInstance().getIv();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.SessionStructure.Chain.MessageKey)
+ }
+
+ static {
+ defaultInstance = new MessageKey(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.SessionStructure.Chain.MessageKey)
+ }
+
+ private int bitField0_;
+ // optional bytes senderRatchetKey = 1;
+ public static final int SENDERRATCHETKEY_FIELD_NUMBER = 1;
+ private com.google.protobuf.ByteString senderRatchetKey_;
+ /**
+ * optional bytes senderRatchetKey = 1;
+ */
+ public boolean hasSenderRatchetKey() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional bytes senderRatchetKey = 1;
+ */
+ public com.google.protobuf.ByteString getSenderRatchetKey() {
+ return senderRatchetKey_;
+ }
+
+ // optional bytes senderRatchetKeyPrivate = 2;
+ public static final int SENDERRATCHETKEYPRIVATE_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString senderRatchetKeyPrivate_;
+ /**
+ * optional bytes senderRatchetKeyPrivate = 2;
+ */
+ public boolean hasSenderRatchetKeyPrivate() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes senderRatchetKeyPrivate = 2;
+ */
+ public com.google.protobuf.ByteString getSenderRatchetKeyPrivate() {
+ return senderRatchetKeyPrivate_;
+ }
+
+ // optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ public static final int CHAINKEY_FIELD_NUMBER = 3;
+ private org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey chainKey_;
+ /**
+ * optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ */
+ public boolean hasChainKey() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey getChainKey() {
+ return chainKey_;
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKeyOrBuilder getChainKeyOrBuilder() {
+ return chainKey_;
+ }
+
+ // repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ public static final int MESSAGEKEYS_FIELD_NUMBER = 4;
+ private java.util.Listrepeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public java.util.Listrepeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public java.util.List extends org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKeyOrBuilder>
+ getMessageKeysOrBuilderList() {
+ return messageKeys_;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public int getMessageKeysCount() {
+ return messageKeys_.size();
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey getMessageKeys(int index) {
+ return messageKeys_.get(index);
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKeyOrBuilder getMessageKeysOrBuilder(
+ int index) {
+ return messageKeys_.get(index);
+ }
+
+ private void initFields() {
+ senderRatchetKey_ = com.google.protobuf.ByteString.EMPTY;
+ senderRatchetKeyPrivate_ = com.google.protobuf.ByteString.EMPTY;
+ chainKey_ = org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey.getDefaultInstance();
+ messageKeys_ = java.util.Collections.emptyList();
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeBytes(1, senderRatchetKey_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, senderRatchetKeyPrivate_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeMessage(3, chainKey_);
+ }
+ for (int i = 0; i < messageKeys_.size(); i++) {
+ output.writeMessage(4, messageKeys_.get(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(1, senderRatchetKey_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, senderRatchetKeyPrivate_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, chainKey_);
+ }
+ for (int i = 0; i < messageKeys_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, messageKeys_.get(i));
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.SessionStructure.Chain}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional bytes senderRatchetKey = 1;
+ */
+ public boolean hasSenderRatchetKey() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional bytes senderRatchetKey = 1;
+ */
+ public com.google.protobuf.ByteString getSenderRatchetKey() {
+ return senderRatchetKey_;
+ }
+ /**
+ * optional bytes senderRatchetKey = 1;
+ */
+ public Builder setSenderRatchetKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ senderRatchetKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes senderRatchetKey = 1;
+ */
+ public Builder clearSenderRatchetKey() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ senderRatchetKey_ = getDefaultInstance().getSenderRatchetKey();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes senderRatchetKeyPrivate = 2;
+ private com.google.protobuf.ByteString senderRatchetKeyPrivate_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes senderRatchetKeyPrivate = 2;
+ */
+ public boolean hasSenderRatchetKeyPrivate() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes senderRatchetKeyPrivate = 2;
+ */
+ public com.google.protobuf.ByteString getSenderRatchetKeyPrivate() {
+ return senderRatchetKeyPrivate_;
+ }
+ /**
+ * optional bytes senderRatchetKeyPrivate = 2;
+ */
+ public Builder setSenderRatchetKeyPrivate(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ senderRatchetKeyPrivate_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes senderRatchetKeyPrivate = 2;
+ */
+ public Builder clearSenderRatchetKeyPrivate() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ senderRatchetKeyPrivate_ = getDefaultInstance().getSenderRatchetKeyPrivate();
+ onChanged();
+ return this;
+ }
+
+ // optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ private org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey chainKey_ = org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey.getDefaultInstance();
+ private com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey.Builder, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKeyOrBuilder> chainKeyBuilder_;
+ /**
+ * optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ */
+ public boolean hasChainKey() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey getChainKey() {
+ if (chainKeyBuilder_ == null) {
+ return chainKey_;
+ } else {
+ return chainKeyBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ */
+ public Builder setChainKey(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey value) {
+ if (chainKeyBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ chainKey_ = value;
+ onChanged();
+ } else {
+ chainKeyBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000004;
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ */
+ public Builder setChainKey(
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey.Builder builderForValue) {
+ if (chainKeyBuilder_ == null) {
+ chainKey_ = builderForValue.build();
+ onChanged();
+ } else {
+ chainKeyBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000004;
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ */
+ public Builder mergeChainKey(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey value) {
+ if (chainKeyBuilder_ == null) {
+ if (((bitField0_ & 0x00000004) == 0x00000004) &&
+ chainKey_ != org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey.getDefaultInstance()) {
+ chainKey_ =
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey.newBuilder(chainKey_).mergeFrom(value).buildPartial();
+ } else {
+ chainKey_ = value;
+ }
+ onChanged();
+ } else {
+ chainKeyBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000004;
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ */
+ public Builder clearChainKey() {
+ if (chainKeyBuilder_ == null) {
+ chainKey_ = org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey.getDefaultInstance();
+ onChanged();
+ } else {
+ chainKeyBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000004);
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey.Builder getChainKeyBuilder() {
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return getChainKeyFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKeyOrBuilder getChainKeyOrBuilder() {
+ if (chainKeyBuilder_ != null) {
+ return chainKeyBuilder_.getMessageOrBuilder();
+ } else {
+ return chainKey_;
+ }
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey.Builder, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKeyOrBuilder>
+ getChainKeyFieldBuilder() {
+ if (chainKeyBuilder_ == null) {
+ chainKeyBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKey.Builder, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.ChainKeyOrBuilder>(
+ chainKey_,
+ getParentForChildren(),
+ isClean());
+ chainKey_ = null;
+ }
+ return chainKeyBuilder_;
+ }
+
+ // repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ private java.util.Listrepeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public java.util.Listrepeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public int getMessageKeysCount() {
+ if (messageKeysBuilder_ == null) {
+ return messageKeys_.size();
+ } else {
+ return messageKeysBuilder_.getCount();
+ }
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey getMessageKeys(int index) {
+ if (messageKeysBuilder_ == null) {
+ return messageKeys_.get(index);
+ } else {
+ return messageKeysBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public Builder setMessageKeys(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey value) {
+ if (messageKeysBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMessageKeysIsMutable();
+ messageKeys_.set(index, value);
+ onChanged();
+ } else {
+ messageKeysBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public Builder setMessageKeys(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey.Builder builderForValue) {
+ if (messageKeysBuilder_ == null) {
+ ensureMessageKeysIsMutable();
+ messageKeys_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ messageKeysBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public Builder addMessageKeys(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey value) {
+ if (messageKeysBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMessageKeysIsMutable();
+ messageKeys_.add(value);
+ onChanged();
+ } else {
+ messageKeysBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public Builder addMessageKeys(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey value) {
+ if (messageKeysBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMessageKeysIsMutable();
+ messageKeys_.add(index, value);
+ onChanged();
+ } else {
+ messageKeysBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public Builder addMessageKeys(
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey.Builder builderForValue) {
+ if (messageKeysBuilder_ == null) {
+ ensureMessageKeysIsMutable();
+ messageKeys_.add(builderForValue.build());
+ onChanged();
+ } else {
+ messageKeysBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public Builder addMessageKeys(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey.Builder builderForValue) {
+ if (messageKeysBuilder_ == null) {
+ ensureMessageKeysIsMutable();
+ messageKeys_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ messageKeysBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public Builder addAllMessageKeys(
+ Iterable extends org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey> values) {
+ if (messageKeysBuilder_ == null) {
+ ensureMessageKeysIsMutable();
+ super.addAll(values, messageKeys_);
+ onChanged();
+ } else {
+ messageKeysBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public Builder clearMessageKeys() {
+ if (messageKeysBuilder_ == null) {
+ messageKeys_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ } else {
+ messageKeysBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public Builder removeMessageKeys(int index) {
+ if (messageKeysBuilder_ == null) {
+ ensureMessageKeysIsMutable();
+ messageKeys_.remove(index);
+ onChanged();
+ } else {
+ messageKeysBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey.Builder getMessageKeysBuilder(
+ int index) {
+ return getMessageKeysFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKeyOrBuilder getMessageKeysOrBuilder(
+ int index) {
+ if (messageKeysBuilder_ == null) {
+ return messageKeys_.get(index); } else {
+ return messageKeysBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public java.util.List extends org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKeyOrBuilder>
+ getMessageKeysOrBuilderList() {
+ if (messageKeysBuilder_ != null) {
+ return messageKeysBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(messageKeys_);
+ }
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey.Builder addMessageKeysBuilder() {
+ return getMessageKeysFieldBuilder().addBuilder(
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey.getDefaultInstance());
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey.Builder addMessageKeysBuilder(
+ int index) {
+ return getMessageKeysFieldBuilder().addBuilder(
+ index, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.MessageKey.getDefaultInstance());
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4;
+ */
+ public java.util.Listoptional uint32 sequence = 1;
+ */
+ boolean hasSequence();
+ /**
+ * optional uint32 sequence = 1;
+ */
+ int getSequence();
+
+ // optional bytes localBaseKey = 2;
+ /**
+ * optional bytes localBaseKey = 2;
+ */
+ boolean hasLocalBaseKey();
+ /**
+ * optional bytes localBaseKey = 2;
+ */
+ com.google.protobuf.ByteString getLocalBaseKey();
+
+ // optional bytes localBaseKeyPrivate = 3;
+ /**
+ * optional bytes localBaseKeyPrivate = 3;
+ */
+ boolean hasLocalBaseKeyPrivate();
+ /**
+ * optional bytes localBaseKeyPrivate = 3;
+ */
+ com.google.protobuf.ByteString getLocalBaseKeyPrivate();
+
+ // optional bytes localRatchetKey = 4;
+ /**
+ * optional bytes localRatchetKey = 4;
+ */
+ boolean hasLocalRatchetKey();
+ /**
+ * optional bytes localRatchetKey = 4;
+ */
+ com.google.protobuf.ByteString getLocalRatchetKey();
+
+ // optional bytes localRatchetKeyPrivate = 5;
+ /**
+ * optional bytes localRatchetKeyPrivate = 5;
+ */
+ boolean hasLocalRatchetKeyPrivate();
+ /**
+ * optional bytes localRatchetKeyPrivate = 5;
+ */
+ com.google.protobuf.ByteString getLocalRatchetKeyPrivate();
+
+ // optional bytes localIdentityKey = 7;
+ /**
+ * optional bytes localIdentityKey = 7;
+ */
+ boolean hasLocalIdentityKey();
+ /**
+ * optional bytes localIdentityKey = 7;
+ */
+ com.google.protobuf.ByteString getLocalIdentityKey();
+
+ // optional bytes localIdentityKeyPrivate = 8;
+ /**
+ * optional bytes localIdentityKeyPrivate = 8;
+ */
+ boolean hasLocalIdentityKeyPrivate();
+ /**
+ * optional bytes localIdentityKeyPrivate = 8;
+ */
+ com.google.protobuf.ByteString getLocalIdentityKeyPrivate();
+ }
+ /**
+ * Protobuf type {@code textsecure.SessionStructure.PendingKeyExchange}
+ */
+ public static final class PendingKeyExchange extends
+ com.google.protobuf.GeneratedMessage
+ implements PendingKeyExchangeOrBuilder {
+ // Use PendingKeyExchange.newBuilder() to construct.
+ private PendingKeyExchange(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private PendingKeyExchange(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final PendingKeyExchange defaultInstance;
+ public static PendingKeyExchange getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public PendingKeyExchange getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private PendingKeyExchange(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ sequence_ = input.readUInt32();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ localBaseKey_ = input.readBytes();
+ break;
+ }
+ case 26: {
+ bitField0_ |= 0x00000004;
+ localBaseKeyPrivate_ = input.readBytes();
+ break;
+ }
+ case 34: {
+ bitField0_ |= 0x00000008;
+ localRatchetKey_ = input.readBytes();
+ break;
+ }
+ case 42: {
+ bitField0_ |= 0x00000010;
+ localRatchetKeyPrivate_ = input.readBytes();
+ break;
+ }
+ case 58: {
+ bitField0_ |= 0x00000020;
+ localIdentityKey_ = input.readBytes();
+ break;
+ }
+ case 66: {
+ bitField0_ |= 0x00000040;
+ localIdentityKeyPrivate_ = input.readBytes();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_SessionStructure_PendingKeyExchange_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_SessionStructure_PendingKeyExchange_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange.class, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional uint32 sequence = 1;
+ */
+ public boolean hasSequence() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 sequence = 1;
+ */
+ public int getSequence() {
+ return sequence_;
+ }
+
+ // optional bytes localBaseKey = 2;
+ public static final int LOCALBASEKEY_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString localBaseKey_;
+ /**
+ * optional bytes localBaseKey = 2;
+ */
+ public boolean hasLocalBaseKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes localBaseKey = 2;
+ */
+ public com.google.protobuf.ByteString getLocalBaseKey() {
+ return localBaseKey_;
+ }
+
+ // optional bytes localBaseKeyPrivate = 3;
+ public static final int LOCALBASEKEYPRIVATE_FIELD_NUMBER = 3;
+ private com.google.protobuf.ByteString localBaseKeyPrivate_;
+ /**
+ * optional bytes localBaseKeyPrivate = 3;
+ */
+ public boolean hasLocalBaseKeyPrivate() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes localBaseKeyPrivate = 3;
+ */
+ public com.google.protobuf.ByteString getLocalBaseKeyPrivate() {
+ return localBaseKeyPrivate_;
+ }
+
+ // optional bytes localRatchetKey = 4;
+ public static final int LOCALRATCHETKEY_FIELD_NUMBER = 4;
+ private com.google.protobuf.ByteString localRatchetKey_;
+ /**
+ * optional bytes localRatchetKey = 4;
+ */
+ public boolean hasLocalRatchetKey() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional bytes localRatchetKey = 4;
+ */
+ public com.google.protobuf.ByteString getLocalRatchetKey() {
+ return localRatchetKey_;
+ }
+
+ // optional bytes localRatchetKeyPrivate = 5;
+ public static final int LOCALRATCHETKEYPRIVATE_FIELD_NUMBER = 5;
+ private com.google.protobuf.ByteString localRatchetKeyPrivate_;
+ /**
+ * optional bytes localRatchetKeyPrivate = 5;
+ */
+ public boolean hasLocalRatchetKeyPrivate() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * optional bytes localRatchetKeyPrivate = 5;
+ */
+ public com.google.protobuf.ByteString getLocalRatchetKeyPrivate() {
+ return localRatchetKeyPrivate_;
+ }
+
+ // optional bytes localIdentityKey = 7;
+ public static final int LOCALIDENTITYKEY_FIELD_NUMBER = 7;
+ private com.google.protobuf.ByteString localIdentityKey_;
+ /**
+ * optional bytes localIdentityKey = 7;
+ */
+ public boolean hasLocalIdentityKey() {
+ return ((bitField0_ & 0x00000020) == 0x00000020);
+ }
+ /**
+ * optional bytes localIdentityKey = 7;
+ */
+ public com.google.protobuf.ByteString getLocalIdentityKey() {
+ return localIdentityKey_;
+ }
+
+ // optional bytes localIdentityKeyPrivate = 8;
+ public static final int LOCALIDENTITYKEYPRIVATE_FIELD_NUMBER = 8;
+ private com.google.protobuf.ByteString localIdentityKeyPrivate_;
+ /**
+ * optional bytes localIdentityKeyPrivate = 8;
+ */
+ public boolean hasLocalIdentityKeyPrivate() {
+ return ((bitField0_ & 0x00000040) == 0x00000040);
+ }
+ /**
+ * optional bytes localIdentityKeyPrivate = 8;
+ */
+ public com.google.protobuf.ByteString getLocalIdentityKeyPrivate() {
+ return localIdentityKeyPrivate_;
+ }
+
+ private void initFields() {
+ sequence_ = 0;
+ localBaseKey_ = com.google.protobuf.ByteString.EMPTY;
+ localBaseKeyPrivate_ = com.google.protobuf.ByteString.EMPTY;
+ localRatchetKey_ = com.google.protobuf.ByteString.EMPTY;
+ localRatchetKeyPrivate_ = com.google.protobuf.ByteString.EMPTY;
+ localIdentityKey_ = com.google.protobuf.ByteString.EMPTY;
+ localIdentityKeyPrivate_ = com.google.protobuf.ByteString.EMPTY;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeUInt32(1, sequence_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, localBaseKey_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeBytes(3, localBaseKeyPrivate_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ output.writeBytes(4, localRatchetKey_);
+ }
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ output.writeBytes(5, localRatchetKeyPrivate_);
+ }
+ if (((bitField0_ & 0x00000020) == 0x00000020)) {
+ output.writeBytes(7, localIdentityKey_);
+ }
+ if (((bitField0_ & 0x00000040) == 0x00000040)) {
+ output.writeBytes(8, localIdentityKeyPrivate_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, sequence_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, localBaseKey_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(3, localBaseKeyPrivate_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(4, localRatchetKey_);
+ }
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(5, localRatchetKeyPrivate_);
+ }
+ if (((bitField0_ & 0x00000020) == 0x00000020)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(7, localIdentityKey_);
+ }
+ if (((bitField0_ & 0x00000040) == 0x00000040)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(8, localIdentityKeyPrivate_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.SessionStructure.PendingKeyExchange}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional uint32 sequence = 1;
+ */
+ public boolean hasSequence() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 sequence = 1;
+ */
+ public int getSequence() {
+ return sequence_;
+ }
+ /**
+ * optional uint32 sequence = 1;
+ */
+ public Builder setSequence(int value) {
+ bitField0_ |= 0x00000001;
+ sequence_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 sequence = 1;
+ */
+ public Builder clearSequence() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ sequence_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional bytes localBaseKey = 2;
+ private com.google.protobuf.ByteString localBaseKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes localBaseKey = 2;
+ */
+ public boolean hasLocalBaseKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes localBaseKey = 2;
+ */
+ public com.google.protobuf.ByteString getLocalBaseKey() {
+ return localBaseKey_;
+ }
+ /**
+ * optional bytes localBaseKey = 2;
+ */
+ public Builder setLocalBaseKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ localBaseKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes localBaseKey = 2;
+ */
+ public Builder clearLocalBaseKey() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ localBaseKey_ = getDefaultInstance().getLocalBaseKey();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes localBaseKeyPrivate = 3;
+ private com.google.protobuf.ByteString localBaseKeyPrivate_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes localBaseKeyPrivate = 3;
+ */
+ public boolean hasLocalBaseKeyPrivate() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes localBaseKeyPrivate = 3;
+ */
+ public com.google.protobuf.ByteString getLocalBaseKeyPrivate() {
+ return localBaseKeyPrivate_;
+ }
+ /**
+ * optional bytes localBaseKeyPrivate = 3;
+ */
+ public Builder setLocalBaseKeyPrivate(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ localBaseKeyPrivate_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes localBaseKeyPrivate = 3;
+ */
+ public Builder clearLocalBaseKeyPrivate() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ localBaseKeyPrivate_ = getDefaultInstance().getLocalBaseKeyPrivate();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes localRatchetKey = 4;
+ private com.google.protobuf.ByteString localRatchetKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes localRatchetKey = 4;
+ */
+ public boolean hasLocalRatchetKey() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional bytes localRatchetKey = 4;
+ */
+ public com.google.protobuf.ByteString getLocalRatchetKey() {
+ return localRatchetKey_;
+ }
+ /**
+ * optional bytes localRatchetKey = 4;
+ */
+ public Builder setLocalRatchetKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000008;
+ localRatchetKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes localRatchetKey = 4;
+ */
+ public Builder clearLocalRatchetKey() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ localRatchetKey_ = getDefaultInstance().getLocalRatchetKey();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes localRatchetKeyPrivate = 5;
+ private com.google.protobuf.ByteString localRatchetKeyPrivate_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes localRatchetKeyPrivate = 5;
+ */
+ public boolean hasLocalRatchetKeyPrivate() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * optional bytes localRatchetKeyPrivate = 5;
+ */
+ public com.google.protobuf.ByteString getLocalRatchetKeyPrivate() {
+ return localRatchetKeyPrivate_;
+ }
+ /**
+ * optional bytes localRatchetKeyPrivate = 5;
+ */
+ public Builder setLocalRatchetKeyPrivate(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000010;
+ localRatchetKeyPrivate_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes localRatchetKeyPrivate = 5;
+ */
+ public Builder clearLocalRatchetKeyPrivate() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ localRatchetKeyPrivate_ = getDefaultInstance().getLocalRatchetKeyPrivate();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes localIdentityKey = 7;
+ private com.google.protobuf.ByteString localIdentityKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes localIdentityKey = 7;
+ */
+ public boolean hasLocalIdentityKey() {
+ return ((bitField0_ & 0x00000020) == 0x00000020);
+ }
+ /**
+ * optional bytes localIdentityKey = 7;
+ */
+ public com.google.protobuf.ByteString getLocalIdentityKey() {
+ return localIdentityKey_;
+ }
+ /**
+ * optional bytes localIdentityKey = 7;
+ */
+ public Builder setLocalIdentityKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000020;
+ localIdentityKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes localIdentityKey = 7;
+ */
+ public Builder clearLocalIdentityKey() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ localIdentityKey_ = getDefaultInstance().getLocalIdentityKey();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes localIdentityKeyPrivate = 8;
+ private com.google.protobuf.ByteString localIdentityKeyPrivate_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes localIdentityKeyPrivate = 8;
+ */
+ public boolean hasLocalIdentityKeyPrivate() {
+ return ((bitField0_ & 0x00000040) == 0x00000040);
+ }
+ /**
+ * optional bytes localIdentityKeyPrivate = 8;
+ */
+ public com.google.protobuf.ByteString getLocalIdentityKeyPrivate() {
+ return localIdentityKeyPrivate_;
+ }
+ /**
+ * optional bytes localIdentityKeyPrivate = 8;
+ */
+ public Builder setLocalIdentityKeyPrivate(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000040;
+ localIdentityKeyPrivate_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes localIdentityKeyPrivate = 8;
+ */
+ public Builder clearLocalIdentityKeyPrivate() {
+ bitField0_ = (bitField0_ & ~0x00000040);
+ localIdentityKeyPrivate_ = getDefaultInstance().getLocalIdentityKeyPrivate();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.SessionStructure.PendingKeyExchange)
+ }
+
+ static {
+ defaultInstance = new PendingKeyExchange(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.SessionStructure.PendingKeyExchange)
+ }
+
+ public interface PendingPreKeyOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional uint32 preKeyId = 1;
+ /**
+ * optional uint32 preKeyId = 1;
+ */
+ boolean hasPreKeyId();
+ /**
+ * optional uint32 preKeyId = 1;
+ */
+ int getPreKeyId();
+
+ // optional int32 signedPreKeyId = 3;
+ /**
+ * optional int32 signedPreKeyId = 3;
+ */
+ boolean hasSignedPreKeyId();
+ /**
+ * optional int32 signedPreKeyId = 3;
+ */
+ int getSignedPreKeyId();
+
+ // optional bytes baseKey = 2;
+ /**
+ * optional bytes baseKey = 2;
+ */
+ boolean hasBaseKey();
+ /**
+ * optional bytes baseKey = 2;
+ */
+ com.google.protobuf.ByteString getBaseKey();
+ }
+ /**
+ * Protobuf type {@code textsecure.SessionStructure.PendingPreKey}
+ */
+ public static final class PendingPreKey extends
+ com.google.protobuf.GeneratedMessage
+ implements PendingPreKeyOrBuilder {
+ // Use PendingPreKey.newBuilder() to construct.
+ private PendingPreKey(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private PendingPreKey(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final PendingPreKey defaultInstance;
+ public static PendingPreKey getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public PendingPreKey getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private PendingPreKey(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ preKeyId_ = input.readUInt32();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000004;
+ baseKey_ = input.readBytes();
+ break;
+ }
+ case 24: {
+ bitField0_ |= 0x00000002;
+ signedPreKeyId_ = input.readInt32();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_SessionStructure_PendingPreKey_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_SessionStructure_PendingPreKey_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey.class, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional uint32 preKeyId = 1;
+ */
+ public boolean hasPreKeyId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 preKeyId = 1;
+ */
+ public int getPreKeyId() {
+ return preKeyId_;
+ }
+
+ // optional int32 signedPreKeyId = 3;
+ public static final int SIGNEDPREKEYID_FIELD_NUMBER = 3;
+ private int signedPreKeyId_;
+ /**
+ * optional int32 signedPreKeyId = 3;
+ */
+ public boolean hasSignedPreKeyId() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional int32 signedPreKeyId = 3;
+ */
+ public int getSignedPreKeyId() {
+ return signedPreKeyId_;
+ }
+
+ // optional bytes baseKey = 2;
+ public static final int BASEKEY_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString baseKey_;
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public boolean hasBaseKey() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public com.google.protobuf.ByteString getBaseKey() {
+ return baseKey_;
+ }
+
+ private void initFields() {
+ preKeyId_ = 0;
+ signedPreKeyId_ = 0;
+ baseKey_ = com.google.protobuf.ByteString.EMPTY;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeUInt32(1, preKeyId_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeBytes(2, baseKey_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeInt32(3, signedPreKeyId_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, preKeyId_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, baseKey_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(3, signedPreKeyId_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.SessionStructure.PendingPreKey}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional uint32 preKeyId = 1;
+ */
+ public boolean hasPreKeyId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 preKeyId = 1;
+ */
+ public int getPreKeyId() {
+ return preKeyId_;
+ }
+ /**
+ * optional uint32 preKeyId = 1;
+ */
+ public Builder setPreKeyId(int value) {
+ bitField0_ |= 0x00000001;
+ preKeyId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 preKeyId = 1;
+ */
+ public Builder clearPreKeyId() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ preKeyId_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional int32 signedPreKeyId = 3;
+ private int signedPreKeyId_ ;
+ /**
+ * optional int32 signedPreKeyId = 3;
+ */
+ public boolean hasSignedPreKeyId() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional int32 signedPreKeyId = 3;
+ */
+ public int getSignedPreKeyId() {
+ return signedPreKeyId_;
+ }
+ /**
+ * optional int32 signedPreKeyId = 3;
+ */
+ public Builder setSignedPreKeyId(int value) {
+ bitField0_ |= 0x00000002;
+ signedPreKeyId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional int32 signedPreKeyId = 3;
+ */
+ public Builder clearSignedPreKeyId() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ signedPreKeyId_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional bytes baseKey = 2;
+ private com.google.protobuf.ByteString baseKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public boolean hasBaseKey() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public com.google.protobuf.ByteString getBaseKey() {
+ return baseKey_;
+ }
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public Builder setBaseKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ baseKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes baseKey = 2;
+ */
+ public Builder clearBaseKey() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ baseKey_ = getDefaultInstance().getBaseKey();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.SessionStructure.PendingPreKey)
+ }
+
+ static {
+ defaultInstance = new PendingPreKey(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.SessionStructure.PendingPreKey)
+ }
+
+ private int bitField0_;
+ // optional uint32 sessionVersion = 1;
+ public static final int SESSIONVERSION_FIELD_NUMBER = 1;
+ private int sessionVersion_;
+ /**
+ * optional uint32 sessionVersion = 1;
+ */
+ public boolean hasSessionVersion() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 sessionVersion = 1;
+ */
+ public int getSessionVersion() {
+ return sessionVersion_;
+ }
+
+ // optional bytes localIdentityPublic = 2;
+ public static final int LOCALIDENTITYPUBLIC_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString localIdentityPublic_;
+ /**
+ * optional bytes localIdentityPublic = 2;
+ */
+ public boolean hasLocalIdentityPublic() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes localIdentityPublic = 2;
+ */
+ public com.google.protobuf.ByteString getLocalIdentityPublic() {
+ return localIdentityPublic_;
+ }
+
+ // optional bytes remoteIdentityPublic = 3;
+ public static final int REMOTEIDENTITYPUBLIC_FIELD_NUMBER = 3;
+ private com.google.protobuf.ByteString remoteIdentityPublic_;
+ /**
+ * optional bytes remoteIdentityPublic = 3;
+ */
+ public boolean hasRemoteIdentityPublic() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes remoteIdentityPublic = 3;
+ */
+ public com.google.protobuf.ByteString getRemoteIdentityPublic() {
+ return remoteIdentityPublic_;
+ }
+
+ // optional bytes rootKey = 4;
+ public static final int ROOTKEY_FIELD_NUMBER = 4;
+ private com.google.protobuf.ByteString rootKey_;
+ /**
+ * optional bytes rootKey = 4;
+ */
+ public boolean hasRootKey() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional bytes rootKey = 4;
+ */
+ public com.google.protobuf.ByteString getRootKey() {
+ return rootKey_;
+ }
+
+ // optional uint32 previousCounter = 5;
+ public static final int PREVIOUSCOUNTER_FIELD_NUMBER = 5;
+ private int previousCounter_;
+ /**
+ * optional uint32 previousCounter = 5;
+ */
+ public boolean hasPreviousCounter() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * optional uint32 previousCounter = 5;
+ */
+ public int getPreviousCounter() {
+ return previousCounter_;
+ }
+
+ // optional .textsecure.SessionStructure.Chain senderChain = 6;
+ public static final int SENDERCHAIN_FIELD_NUMBER = 6;
+ private org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain senderChain_;
+ /**
+ * optional .textsecure.SessionStructure.Chain senderChain = 6;
+ */
+ public boolean hasSenderChain() {
+ return ((bitField0_ & 0x00000020) == 0x00000020);
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain senderChain = 6;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain getSenderChain() {
+ return senderChain_;
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain senderChain = 6;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.ChainOrBuilder getSenderChainOrBuilder() {
+ return senderChain_;
+ }
+
+ // repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ public static final int RECEIVERCHAINS_FIELD_NUMBER = 7;
+ private java.util.Listrepeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public java.util.Listrepeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public java.util.List extends org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.ChainOrBuilder>
+ getReceiverChainsOrBuilderList() {
+ return receiverChains_;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public int getReceiverChainsCount() {
+ return receiverChains_.size();
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain getReceiverChains(int index) {
+ return receiverChains_.get(index);
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.ChainOrBuilder getReceiverChainsOrBuilder(
+ int index) {
+ return receiverChains_.get(index);
+ }
+
+ // optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ public static final int PENDINGKEYEXCHANGE_FIELD_NUMBER = 8;
+ private org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange pendingKeyExchange_;
+ /**
+ * optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ */
+ public boolean hasPendingKeyExchange() {
+ return ((bitField0_ & 0x00000040) == 0x00000040);
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange getPendingKeyExchange() {
+ return pendingKeyExchange_;
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchangeOrBuilder getPendingKeyExchangeOrBuilder() {
+ return pendingKeyExchange_;
+ }
+
+ // optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ public static final int PENDINGPREKEY_FIELD_NUMBER = 9;
+ private org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey pendingPreKey_;
+ /**
+ * optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ */
+ public boolean hasPendingPreKey() {
+ return ((bitField0_ & 0x00000080) == 0x00000080);
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey getPendingPreKey() {
+ return pendingPreKey_;
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKeyOrBuilder getPendingPreKeyOrBuilder() {
+ return pendingPreKey_;
+ }
+
+ // optional uint32 remoteRegistrationId = 10;
+ public static final int REMOTEREGISTRATIONID_FIELD_NUMBER = 10;
+ private int remoteRegistrationId_;
+ /**
+ * optional uint32 remoteRegistrationId = 10;
+ */
+ public boolean hasRemoteRegistrationId() {
+ return ((bitField0_ & 0x00000100) == 0x00000100);
+ }
+ /**
+ * optional uint32 remoteRegistrationId = 10;
+ */
+ public int getRemoteRegistrationId() {
+ return remoteRegistrationId_;
+ }
+
+ // optional uint32 localRegistrationId = 11;
+ public static final int LOCALREGISTRATIONID_FIELD_NUMBER = 11;
+ private int localRegistrationId_;
+ /**
+ * optional uint32 localRegistrationId = 11;
+ */
+ public boolean hasLocalRegistrationId() {
+ return ((bitField0_ & 0x00000200) == 0x00000200);
+ }
+ /**
+ * optional uint32 localRegistrationId = 11;
+ */
+ public int getLocalRegistrationId() {
+ return localRegistrationId_;
+ }
+
+ // optional bool needsRefresh = 12;
+ public static final int NEEDSREFRESH_FIELD_NUMBER = 12;
+ private boolean needsRefresh_;
+ /**
+ * optional bool needsRefresh = 12;
+ */
+ public boolean hasNeedsRefresh() {
+ return ((bitField0_ & 0x00000400) == 0x00000400);
+ }
+ /**
+ * optional bool needsRefresh = 12;
+ */
+ public boolean getNeedsRefresh() {
+ return needsRefresh_;
+ }
+
+ // optional bytes aliceBaseKey = 13;
+ public static final int ALICEBASEKEY_FIELD_NUMBER = 13;
+ private com.google.protobuf.ByteString aliceBaseKey_;
+ /**
+ * optional bytes aliceBaseKey = 13;
+ */
+ public boolean hasAliceBaseKey() {
+ return ((bitField0_ & 0x00000800) == 0x00000800);
+ }
+ /**
+ * optional bytes aliceBaseKey = 13;
+ */
+ public com.google.protobuf.ByteString getAliceBaseKey() {
+ return aliceBaseKey_;
+ }
+
+ private void initFields() {
+ sessionVersion_ = 0;
+ localIdentityPublic_ = com.google.protobuf.ByteString.EMPTY;
+ remoteIdentityPublic_ = com.google.protobuf.ByteString.EMPTY;
+ rootKey_ = com.google.protobuf.ByteString.EMPTY;
+ previousCounter_ = 0;
+ senderChain_ = org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.getDefaultInstance();
+ receiverChains_ = java.util.Collections.emptyList();
+ pendingKeyExchange_ = org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange.getDefaultInstance();
+ pendingPreKey_ = org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey.getDefaultInstance();
+ remoteRegistrationId_ = 0;
+ localRegistrationId_ = 0;
+ needsRefresh_ = false;
+ aliceBaseKey_ = com.google.protobuf.ByteString.EMPTY;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeUInt32(1, sessionVersion_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, localIdentityPublic_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeBytes(3, remoteIdentityPublic_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ output.writeBytes(4, rootKey_);
+ }
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ output.writeUInt32(5, previousCounter_);
+ }
+ if (((bitField0_ & 0x00000020) == 0x00000020)) {
+ output.writeMessage(6, senderChain_);
+ }
+ for (int i = 0; i < receiverChains_.size(); i++) {
+ output.writeMessage(7, receiverChains_.get(i));
+ }
+ if (((bitField0_ & 0x00000040) == 0x00000040)) {
+ output.writeMessage(8, pendingKeyExchange_);
+ }
+ if (((bitField0_ & 0x00000080) == 0x00000080)) {
+ output.writeMessage(9, pendingPreKey_);
+ }
+ if (((bitField0_ & 0x00000100) == 0x00000100)) {
+ output.writeUInt32(10, remoteRegistrationId_);
+ }
+ if (((bitField0_ & 0x00000200) == 0x00000200)) {
+ output.writeUInt32(11, localRegistrationId_);
+ }
+ if (((bitField0_ & 0x00000400) == 0x00000400)) {
+ output.writeBool(12, needsRefresh_);
+ }
+ if (((bitField0_ & 0x00000800) == 0x00000800)) {
+ output.writeBytes(13, aliceBaseKey_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, sessionVersion_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, localIdentityPublic_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(3, remoteIdentityPublic_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(4, rootKey_);
+ }
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(5, previousCounter_);
+ }
+ if (((bitField0_ & 0x00000020) == 0x00000020)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(6, senderChain_);
+ }
+ for (int i = 0; i < receiverChains_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(7, receiverChains_.get(i));
+ }
+ if (((bitField0_ & 0x00000040) == 0x00000040)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(8, pendingKeyExchange_);
+ }
+ if (((bitField0_ & 0x00000080) == 0x00000080)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(9, pendingPreKey_);
+ }
+ if (((bitField0_ & 0x00000100) == 0x00000100)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(10, remoteRegistrationId_);
+ }
+ if (((bitField0_ & 0x00000200) == 0x00000200)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(11, localRegistrationId_);
+ }
+ if (((bitField0_ & 0x00000400) == 0x00000400)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(12, needsRefresh_);
+ }
+ if (((bitField0_ & 0x00000800) == 0x00000800)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(13, aliceBaseKey_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SessionStructure parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.SessionStructure}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional uint32 sessionVersion = 1;
+ */
+ public boolean hasSessionVersion() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 sessionVersion = 1;
+ */
+ public int getSessionVersion() {
+ return sessionVersion_;
+ }
+ /**
+ * optional uint32 sessionVersion = 1;
+ */
+ public Builder setSessionVersion(int value) {
+ bitField0_ |= 0x00000001;
+ sessionVersion_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 sessionVersion = 1;
+ */
+ public Builder clearSessionVersion() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ sessionVersion_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional bytes localIdentityPublic = 2;
+ private com.google.protobuf.ByteString localIdentityPublic_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes localIdentityPublic = 2;
+ */
+ public boolean hasLocalIdentityPublic() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes localIdentityPublic = 2;
+ */
+ public com.google.protobuf.ByteString getLocalIdentityPublic() {
+ return localIdentityPublic_;
+ }
+ /**
+ * optional bytes localIdentityPublic = 2;
+ */
+ public Builder setLocalIdentityPublic(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ localIdentityPublic_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes localIdentityPublic = 2;
+ */
+ public Builder clearLocalIdentityPublic() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ localIdentityPublic_ = getDefaultInstance().getLocalIdentityPublic();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes remoteIdentityPublic = 3;
+ private com.google.protobuf.ByteString remoteIdentityPublic_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes remoteIdentityPublic = 3;
+ */
+ public boolean hasRemoteIdentityPublic() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes remoteIdentityPublic = 3;
+ */
+ public com.google.protobuf.ByteString getRemoteIdentityPublic() {
+ return remoteIdentityPublic_;
+ }
+ /**
+ * optional bytes remoteIdentityPublic = 3;
+ */
+ public Builder setRemoteIdentityPublic(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ remoteIdentityPublic_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes remoteIdentityPublic = 3;
+ */
+ public Builder clearRemoteIdentityPublic() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ remoteIdentityPublic_ = getDefaultInstance().getRemoteIdentityPublic();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes rootKey = 4;
+ private com.google.protobuf.ByteString rootKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes rootKey = 4;
+ */
+ public boolean hasRootKey() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional bytes rootKey = 4;
+ */
+ public com.google.protobuf.ByteString getRootKey() {
+ return rootKey_;
+ }
+ /**
+ * optional bytes rootKey = 4;
+ */
+ public Builder setRootKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000008;
+ rootKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes rootKey = 4;
+ */
+ public Builder clearRootKey() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ rootKey_ = getDefaultInstance().getRootKey();
+ onChanged();
+ return this;
+ }
+
+ // optional uint32 previousCounter = 5;
+ private int previousCounter_ ;
+ /**
+ * optional uint32 previousCounter = 5;
+ */
+ public boolean hasPreviousCounter() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * optional uint32 previousCounter = 5;
+ */
+ public int getPreviousCounter() {
+ return previousCounter_;
+ }
+ /**
+ * optional uint32 previousCounter = 5;
+ */
+ public Builder setPreviousCounter(int value) {
+ bitField0_ |= 0x00000010;
+ previousCounter_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 previousCounter = 5;
+ */
+ public Builder clearPreviousCounter() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ previousCounter_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional .textsecure.SessionStructure.Chain senderChain = 6;
+ private org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain senderChain_ = org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.getDefaultInstance();
+ private com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.Builder, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.ChainOrBuilder> senderChainBuilder_;
+ /**
+ * optional .textsecure.SessionStructure.Chain senderChain = 6;
+ */
+ public boolean hasSenderChain() {
+ return ((bitField0_ & 0x00000020) == 0x00000020);
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain senderChain = 6;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain getSenderChain() {
+ if (senderChainBuilder_ == null) {
+ return senderChain_;
+ } else {
+ return senderChainBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain senderChain = 6;
+ */
+ public Builder setSenderChain(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain value) {
+ if (senderChainBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ senderChain_ = value;
+ onChanged();
+ } else {
+ senderChainBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000020;
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain senderChain = 6;
+ */
+ public Builder setSenderChain(
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.Builder builderForValue) {
+ if (senderChainBuilder_ == null) {
+ senderChain_ = builderForValue.build();
+ onChanged();
+ } else {
+ senderChainBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000020;
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain senderChain = 6;
+ */
+ public Builder mergeSenderChain(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain value) {
+ if (senderChainBuilder_ == null) {
+ if (((bitField0_ & 0x00000020) == 0x00000020) &&
+ senderChain_ != org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.getDefaultInstance()) {
+ senderChain_ =
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.newBuilder(senderChain_).mergeFrom(value).buildPartial();
+ } else {
+ senderChain_ = value;
+ }
+ onChanged();
+ } else {
+ senderChainBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000020;
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain senderChain = 6;
+ */
+ public Builder clearSenderChain() {
+ if (senderChainBuilder_ == null) {
+ senderChain_ = org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.getDefaultInstance();
+ onChanged();
+ } else {
+ senderChainBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000020);
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain senderChain = 6;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.Builder getSenderChainBuilder() {
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return getSenderChainFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain senderChain = 6;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.ChainOrBuilder getSenderChainOrBuilder() {
+ if (senderChainBuilder_ != null) {
+ return senderChainBuilder_.getMessageOrBuilder();
+ } else {
+ return senderChain_;
+ }
+ }
+ /**
+ * optional .textsecure.SessionStructure.Chain senderChain = 6;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.Builder, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.ChainOrBuilder>
+ getSenderChainFieldBuilder() {
+ if (senderChainBuilder_ == null) {
+ senderChainBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.Builder, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.ChainOrBuilder>(
+ senderChain_,
+ getParentForChildren(),
+ isClean());
+ senderChain_ = null;
+ }
+ return senderChainBuilder_;
+ }
+
+ // repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ private java.util.Listrepeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public java.util.Listrepeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public int getReceiverChainsCount() {
+ if (receiverChainsBuilder_ == null) {
+ return receiverChains_.size();
+ } else {
+ return receiverChainsBuilder_.getCount();
+ }
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain getReceiverChains(int index) {
+ if (receiverChainsBuilder_ == null) {
+ return receiverChains_.get(index);
+ } else {
+ return receiverChainsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public Builder setReceiverChains(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain value) {
+ if (receiverChainsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureReceiverChainsIsMutable();
+ receiverChains_.set(index, value);
+ onChanged();
+ } else {
+ receiverChainsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public Builder setReceiverChains(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.Builder builderForValue) {
+ if (receiverChainsBuilder_ == null) {
+ ensureReceiverChainsIsMutable();
+ receiverChains_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ receiverChainsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public Builder addReceiverChains(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain value) {
+ if (receiverChainsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureReceiverChainsIsMutable();
+ receiverChains_.add(value);
+ onChanged();
+ } else {
+ receiverChainsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public Builder addReceiverChains(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain value) {
+ if (receiverChainsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureReceiverChainsIsMutable();
+ receiverChains_.add(index, value);
+ onChanged();
+ } else {
+ receiverChainsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public Builder addReceiverChains(
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.Builder builderForValue) {
+ if (receiverChainsBuilder_ == null) {
+ ensureReceiverChainsIsMutable();
+ receiverChains_.add(builderForValue.build());
+ onChanged();
+ } else {
+ receiverChainsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public Builder addReceiverChains(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.Builder builderForValue) {
+ if (receiverChainsBuilder_ == null) {
+ ensureReceiverChainsIsMutable();
+ receiverChains_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ receiverChainsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public Builder addAllReceiverChains(
+ Iterable extends org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain> values) {
+ if (receiverChainsBuilder_ == null) {
+ ensureReceiverChainsIsMutable();
+ super.addAll(values, receiverChains_);
+ onChanged();
+ } else {
+ receiverChainsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public Builder clearReceiverChains() {
+ if (receiverChainsBuilder_ == null) {
+ receiverChains_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000040);
+ onChanged();
+ } else {
+ receiverChainsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public Builder removeReceiverChains(int index) {
+ if (receiverChainsBuilder_ == null) {
+ ensureReceiverChainsIsMutable();
+ receiverChains_.remove(index);
+ onChanged();
+ } else {
+ receiverChainsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.Builder getReceiverChainsBuilder(
+ int index) {
+ return getReceiverChainsFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.ChainOrBuilder getReceiverChainsOrBuilder(
+ int index) {
+ if (receiverChainsBuilder_ == null) {
+ return receiverChains_.get(index); } else {
+ return receiverChainsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public java.util.List extends org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.ChainOrBuilder>
+ getReceiverChainsOrBuilderList() {
+ if (receiverChainsBuilder_ != null) {
+ return receiverChainsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(receiverChains_);
+ }
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.Builder addReceiverChainsBuilder() {
+ return getReceiverChainsFieldBuilder().addBuilder(
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.getDefaultInstance());
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.Builder addReceiverChainsBuilder(
+ int index) {
+ return getReceiverChainsFieldBuilder().addBuilder(
+ index, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Chain.getDefaultInstance());
+ }
+ /**
+ * repeated .textsecure.SessionStructure.Chain receiverChains = 7;
+ */
+ public java.util.Listoptional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ */
+ public boolean hasPendingKeyExchange() {
+ return ((bitField0_ & 0x00000080) == 0x00000080);
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange getPendingKeyExchange() {
+ if (pendingKeyExchangeBuilder_ == null) {
+ return pendingKeyExchange_;
+ } else {
+ return pendingKeyExchangeBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ */
+ public Builder setPendingKeyExchange(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange value) {
+ if (pendingKeyExchangeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ pendingKeyExchange_ = value;
+ onChanged();
+ } else {
+ pendingKeyExchangeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000080;
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ */
+ public Builder setPendingKeyExchange(
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange.Builder builderForValue) {
+ if (pendingKeyExchangeBuilder_ == null) {
+ pendingKeyExchange_ = builderForValue.build();
+ onChanged();
+ } else {
+ pendingKeyExchangeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000080;
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ */
+ public Builder mergePendingKeyExchange(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange value) {
+ if (pendingKeyExchangeBuilder_ == null) {
+ if (((bitField0_ & 0x00000080) == 0x00000080) &&
+ pendingKeyExchange_ != org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange.getDefaultInstance()) {
+ pendingKeyExchange_ =
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange.newBuilder(pendingKeyExchange_).mergeFrom(value).buildPartial();
+ } else {
+ pendingKeyExchange_ = value;
+ }
+ onChanged();
+ } else {
+ pendingKeyExchangeBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000080;
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ */
+ public Builder clearPendingKeyExchange() {
+ if (pendingKeyExchangeBuilder_ == null) {
+ pendingKeyExchange_ = org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange.getDefaultInstance();
+ onChanged();
+ } else {
+ pendingKeyExchangeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000080);
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange.Builder getPendingKeyExchangeBuilder() {
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return getPendingKeyExchangeFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchangeOrBuilder getPendingKeyExchangeOrBuilder() {
+ if (pendingKeyExchangeBuilder_ != null) {
+ return pendingKeyExchangeBuilder_.getMessageOrBuilder();
+ } else {
+ return pendingKeyExchange_;
+ }
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange.Builder, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchangeOrBuilder>
+ getPendingKeyExchangeFieldBuilder() {
+ if (pendingKeyExchangeBuilder_ == null) {
+ pendingKeyExchangeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchange.Builder, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingKeyExchangeOrBuilder>(
+ pendingKeyExchange_,
+ getParentForChildren(),
+ isClean());
+ pendingKeyExchange_ = null;
+ }
+ return pendingKeyExchangeBuilder_;
+ }
+
+ // optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ private org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey pendingPreKey_ = org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey.getDefaultInstance();
+ private com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey.Builder, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKeyOrBuilder> pendingPreKeyBuilder_;
+ /**
+ * optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ */
+ public boolean hasPendingPreKey() {
+ return ((bitField0_ & 0x00000100) == 0x00000100);
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey getPendingPreKey() {
+ if (pendingPreKeyBuilder_ == null) {
+ return pendingPreKey_;
+ } else {
+ return pendingPreKeyBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ */
+ public Builder setPendingPreKey(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey value) {
+ if (pendingPreKeyBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ pendingPreKey_ = value;
+ onChanged();
+ } else {
+ pendingPreKeyBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000100;
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ */
+ public Builder setPendingPreKey(
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey.Builder builderForValue) {
+ if (pendingPreKeyBuilder_ == null) {
+ pendingPreKey_ = builderForValue.build();
+ onChanged();
+ } else {
+ pendingPreKeyBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000100;
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ */
+ public Builder mergePendingPreKey(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey value) {
+ if (pendingPreKeyBuilder_ == null) {
+ if (((bitField0_ & 0x00000100) == 0x00000100) &&
+ pendingPreKey_ != org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey.getDefaultInstance()) {
+ pendingPreKey_ =
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey.newBuilder(pendingPreKey_).mergeFrom(value).buildPartial();
+ } else {
+ pendingPreKey_ = value;
+ }
+ onChanged();
+ } else {
+ pendingPreKeyBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000100;
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ */
+ public Builder clearPendingPreKey() {
+ if (pendingPreKeyBuilder_ == null) {
+ pendingPreKey_ = org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey.getDefaultInstance();
+ onChanged();
+ } else {
+ pendingPreKeyBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000100);
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey.Builder getPendingPreKeyBuilder() {
+ bitField0_ |= 0x00000100;
+ onChanged();
+ return getPendingPreKeyFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKeyOrBuilder getPendingPreKeyOrBuilder() {
+ if (pendingPreKeyBuilder_ != null) {
+ return pendingPreKeyBuilder_.getMessageOrBuilder();
+ } else {
+ return pendingPreKey_;
+ }
+ }
+ /**
+ * optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey.Builder, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKeyOrBuilder>
+ getPendingPreKeyFieldBuilder() {
+ if (pendingPreKeyBuilder_ == null) {
+ pendingPreKeyBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKey.Builder, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PendingPreKeyOrBuilder>(
+ pendingPreKey_,
+ getParentForChildren(),
+ isClean());
+ pendingPreKey_ = null;
+ }
+ return pendingPreKeyBuilder_;
+ }
+
+ // optional uint32 remoteRegistrationId = 10;
+ private int remoteRegistrationId_ ;
+ /**
+ * optional uint32 remoteRegistrationId = 10;
+ */
+ public boolean hasRemoteRegistrationId() {
+ return ((bitField0_ & 0x00000200) == 0x00000200);
+ }
+ /**
+ * optional uint32 remoteRegistrationId = 10;
+ */
+ public int getRemoteRegistrationId() {
+ return remoteRegistrationId_;
+ }
+ /**
+ * optional uint32 remoteRegistrationId = 10;
+ */
+ public Builder setRemoteRegistrationId(int value) {
+ bitField0_ |= 0x00000200;
+ remoteRegistrationId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 remoteRegistrationId = 10;
+ */
+ public Builder clearRemoteRegistrationId() {
+ bitField0_ = (bitField0_ & ~0x00000200);
+ remoteRegistrationId_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional uint32 localRegistrationId = 11;
+ private int localRegistrationId_ ;
+ /**
+ * optional uint32 localRegistrationId = 11;
+ */
+ public boolean hasLocalRegistrationId() {
+ return ((bitField0_ & 0x00000400) == 0x00000400);
+ }
+ /**
+ * optional uint32 localRegistrationId = 11;
+ */
+ public int getLocalRegistrationId() {
+ return localRegistrationId_;
+ }
+ /**
+ * optional uint32 localRegistrationId = 11;
+ */
+ public Builder setLocalRegistrationId(int value) {
+ bitField0_ |= 0x00000400;
+ localRegistrationId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 localRegistrationId = 11;
+ */
+ public Builder clearLocalRegistrationId() {
+ bitField0_ = (bitField0_ & ~0x00000400);
+ localRegistrationId_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional bool needsRefresh = 12;
+ private boolean needsRefresh_ ;
+ /**
+ * optional bool needsRefresh = 12;
+ */
+ public boolean hasNeedsRefresh() {
+ return ((bitField0_ & 0x00000800) == 0x00000800);
+ }
+ /**
+ * optional bool needsRefresh = 12;
+ */
+ public boolean getNeedsRefresh() {
+ return needsRefresh_;
+ }
+ /**
+ * optional bool needsRefresh = 12;
+ */
+ public Builder setNeedsRefresh(boolean value) {
+ bitField0_ |= 0x00000800;
+ needsRefresh_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bool needsRefresh = 12;
+ */
+ public Builder clearNeedsRefresh() {
+ bitField0_ = (bitField0_ & ~0x00000800);
+ needsRefresh_ = false;
+ onChanged();
+ return this;
+ }
+
+ // optional bytes aliceBaseKey = 13;
+ private com.google.protobuf.ByteString aliceBaseKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes aliceBaseKey = 13;
+ */
+ public boolean hasAliceBaseKey() {
+ return ((bitField0_ & 0x00001000) == 0x00001000);
+ }
+ /**
+ * optional bytes aliceBaseKey = 13;
+ */
+ public com.google.protobuf.ByteString getAliceBaseKey() {
+ return aliceBaseKey_;
+ }
+ /**
+ * optional bytes aliceBaseKey = 13;
+ */
+ public Builder setAliceBaseKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00001000;
+ aliceBaseKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes aliceBaseKey = 13;
+ */
+ public Builder clearAliceBaseKey() {
+ bitField0_ = (bitField0_ & ~0x00001000);
+ aliceBaseKey_ = getDefaultInstance().getAliceBaseKey();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.SessionStructure)
+ }
+
+ static {
+ defaultInstance = new SessionStructure(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.SessionStructure)
+ }
+
+ public interface RecordStructureOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional .textsecure.SessionStructure currentSession = 1;
+ /**
+ * optional .textsecure.SessionStructure currentSession = 1;
+ */
+ boolean hasCurrentSession();
+ /**
+ * optional .textsecure.SessionStructure currentSession = 1;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure getCurrentSession();
+ /**
+ * optional .textsecure.SessionStructure currentSession = 1;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructureOrBuilder getCurrentSessionOrBuilder();
+
+ // repeated .textsecure.SessionStructure previousSessions = 2;
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ java.util.Listrepeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure getPreviousSessions(int index);
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ int getPreviousSessionsCount();
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ java.util.List extends org.session.libsignal.libsignal.state.StorageProtos.SessionStructureOrBuilder>
+ getPreviousSessionsOrBuilderList();
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructureOrBuilder getPreviousSessionsOrBuilder(
+ int index);
+ }
+ /**
+ * Protobuf type {@code textsecure.RecordStructure}
+ */
+ public static final class RecordStructure extends
+ com.google.protobuf.GeneratedMessage
+ implements RecordStructureOrBuilder {
+ // Use RecordStructure.newBuilder() to construct.
+ private RecordStructure(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private RecordStructure(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final RecordStructure defaultInstance;
+ public static RecordStructure getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public RecordStructure getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private RecordStructure(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ subBuilder = currentSession_.toBuilder();
+ }
+ currentSession_ = input.readMessage(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(currentSession_);
+ currentSession_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000001;
+ break;
+ }
+ case 18: {
+ if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+ previousSessions_ = new java.util.ArrayListoptional .textsecure.SessionStructure currentSession = 1;
+ */
+ public boolean hasCurrentSession() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional .textsecure.SessionStructure currentSession = 1;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure getCurrentSession() {
+ return currentSession_;
+ }
+ /**
+ * optional .textsecure.SessionStructure currentSession = 1;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructureOrBuilder getCurrentSessionOrBuilder() {
+ return currentSession_;
+ }
+
+ // repeated .textsecure.SessionStructure previousSessions = 2;
+ public static final int PREVIOUSSESSIONS_FIELD_NUMBER = 2;
+ private java.util.Listrepeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public java.util.Listrepeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public java.util.List extends org.session.libsignal.libsignal.state.StorageProtos.SessionStructureOrBuilder>
+ getPreviousSessionsOrBuilderList() {
+ return previousSessions_;
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public int getPreviousSessionsCount() {
+ return previousSessions_.size();
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure getPreviousSessions(int index) {
+ return previousSessions_.get(index);
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructureOrBuilder getPreviousSessionsOrBuilder(
+ int index) {
+ return previousSessions_.get(index);
+ }
+
+ private void initFields() {
+ currentSession_ = org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.getDefaultInstance();
+ previousSessions_ = java.util.Collections.emptyList();
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeMessage(1, currentSession_);
+ }
+ for (int i = 0; i < previousSessions_.size(); i++) {
+ output.writeMessage(2, previousSessions_.get(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, currentSession_);
+ }
+ for (int i = 0; i < previousSessions_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, previousSessions_.get(i));
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.state.StorageProtos.RecordStructure parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.RecordStructure parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.RecordStructure parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.RecordStructure parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.RecordStructure parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.RecordStructure parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.RecordStructure parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.RecordStructure parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.RecordStructure parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.RecordStructure parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.state.StorageProtos.RecordStructure prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.RecordStructure}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional .textsecure.SessionStructure currentSession = 1;
+ */
+ public boolean hasCurrentSession() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional .textsecure.SessionStructure currentSession = 1;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure getCurrentSession() {
+ if (currentSessionBuilder_ == null) {
+ return currentSession_;
+ } else {
+ return currentSessionBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .textsecure.SessionStructure currentSession = 1;
+ */
+ public Builder setCurrentSession(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure value) {
+ if (currentSessionBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ currentSession_ = value;
+ onChanged();
+ } else {
+ currentSessionBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure currentSession = 1;
+ */
+ public Builder setCurrentSession(
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Builder builderForValue) {
+ if (currentSessionBuilder_ == null) {
+ currentSession_ = builderForValue.build();
+ onChanged();
+ } else {
+ currentSessionBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure currentSession = 1;
+ */
+ public Builder mergeCurrentSession(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure value) {
+ if (currentSessionBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) == 0x00000001) &&
+ currentSession_ != org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.getDefaultInstance()) {
+ currentSession_ =
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.newBuilder(currentSession_).mergeFrom(value).buildPartial();
+ } else {
+ currentSession_ = value;
+ }
+ onChanged();
+ } else {
+ currentSessionBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure currentSession = 1;
+ */
+ public Builder clearCurrentSession() {
+ if (currentSessionBuilder_ == null) {
+ currentSession_ = org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.getDefaultInstance();
+ onChanged();
+ } else {
+ currentSessionBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+ /**
+ * optional .textsecure.SessionStructure currentSession = 1;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Builder getCurrentSessionBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getCurrentSessionFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .textsecure.SessionStructure currentSession = 1;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructureOrBuilder getCurrentSessionOrBuilder() {
+ if (currentSessionBuilder_ != null) {
+ return currentSessionBuilder_.getMessageOrBuilder();
+ } else {
+ return currentSession_;
+ }
+ }
+ /**
+ * optional .textsecure.SessionStructure currentSession = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Builder, org.session.libsignal.libsignal.state.StorageProtos.SessionStructureOrBuilder>
+ getCurrentSessionFieldBuilder() {
+ if (currentSessionBuilder_ == null) {
+ currentSessionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Builder, org.session.libsignal.libsignal.state.StorageProtos.SessionStructureOrBuilder>(
+ currentSession_,
+ getParentForChildren(),
+ isClean());
+ currentSession_ = null;
+ }
+ return currentSessionBuilder_;
+ }
+
+ // repeated .textsecure.SessionStructure previousSessions = 2;
+ private java.util.Listrepeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public java.util.Listrepeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public int getPreviousSessionsCount() {
+ if (previousSessionsBuilder_ == null) {
+ return previousSessions_.size();
+ } else {
+ return previousSessionsBuilder_.getCount();
+ }
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure getPreviousSessions(int index) {
+ if (previousSessionsBuilder_ == null) {
+ return previousSessions_.get(index);
+ } else {
+ return previousSessionsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public Builder setPreviousSessions(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure value) {
+ if (previousSessionsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePreviousSessionsIsMutable();
+ previousSessions_.set(index, value);
+ onChanged();
+ } else {
+ previousSessionsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public Builder setPreviousSessions(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Builder builderForValue) {
+ if (previousSessionsBuilder_ == null) {
+ ensurePreviousSessionsIsMutable();
+ previousSessions_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ previousSessionsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public Builder addPreviousSessions(org.session.libsignal.libsignal.state.StorageProtos.SessionStructure value) {
+ if (previousSessionsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePreviousSessionsIsMutable();
+ previousSessions_.add(value);
+ onChanged();
+ } else {
+ previousSessionsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public Builder addPreviousSessions(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure value) {
+ if (previousSessionsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePreviousSessionsIsMutable();
+ previousSessions_.add(index, value);
+ onChanged();
+ } else {
+ previousSessionsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public Builder addPreviousSessions(
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Builder builderForValue) {
+ if (previousSessionsBuilder_ == null) {
+ ensurePreviousSessionsIsMutable();
+ previousSessions_.add(builderForValue.build());
+ onChanged();
+ } else {
+ previousSessionsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public Builder addPreviousSessions(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Builder builderForValue) {
+ if (previousSessionsBuilder_ == null) {
+ ensurePreviousSessionsIsMutable();
+ previousSessions_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ previousSessionsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public Builder addAllPreviousSessions(
+ Iterable extends org.session.libsignal.libsignal.state.StorageProtos.SessionStructure> values) {
+ if (previousSessionsBuilder_ == null) {
+ ensurePreviousSessionsIsMutable();
+ super.addAll(values, previousSessions_);
+ onChanged();
+ } else {
+ previousSessionsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public Builder clearPreviousSessions() {
+ if (previousSessionsBuilder_ == null) {
+ previousSessions_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ previousSessionsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public Builder removePreviousSessions(int index) {
+ if (previousSessionsBuilder_ == null) {
+ ensurePreviousSessionsIsMutable();
+ previousSessions_.remove(index);
+ onChanged();
+ } else {
+ previousSessionsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Builder getPreviousSessionsBuilder(
+ int index) {
+ return getPreviousSessionsFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructureOrBuilder getPreviousSessionsOrBuilder(
+ int index) {
+ if (previousSessionsBuilder_ == null) {
+ return previousSessions_.get(index); } else {
+ return previousSessionsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public java.util.List extends org.session.libsignal.libsignal.state.StorageProtos.SessionStructureOrBuilder>
+ getPreviousSessionsOrBuilderList() {
+ if (previousSessionsBuilder_ != null) {
+ return previousSessionsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(previousSessions_);
+ }
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Builder addPreviousSessionsBuilder() {
+ return getPreviousSessionsFieldBuilder().addBuilder(
+ org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.getDefaultInstance());
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.Builder addPreviousSessionsBuilder(
+ int index) {
+ return getPreviousSessionsFieldBuilder().addBuilder(
+ index, org.session.libsignal.libsignal.state.StorageProtos.SessionStructure.getDefaultInstance());
+ }
+ /**
+ * repeated .textsecure.SessionStructure previousSessions = 2;
+ */
+ public java.util.Listoptional uint32 id = 1;
+ */
+ boolean hasId();
+ /**
+ * optional uint32 id = 1;
+ */
+ int getId();
+
+ // optional bytes publicKey = 2;
+ /**
+ * optional bytes publicKey = 2;
+ */
+ boolean hasPublicKey();
+ /**
+ * optional bytes publicKey = 2;
+ */
+ com.google.protobuf.ByteString getPublicKey();
+
+ // optional bytes privateKey = 3;
+ /**
+ * optional bytes privateKey = 3;
+ */
+ boolean hasPrivateKey();
+ /**
+ * optional bytes privateKey = 3;
+ */
+ com.google.protobuf.ByteString getPrivateKey();
+ }
+ /**
+ * Protobuf type {@code textsecure.PreKeyRecordStructure}
+ */
+ public static final class PreKeyRecordStructure extends
+ com.google.protobuf.GeneratedMessage
+ implements PreKeyRecordStructureOrBuilder {
+ // Use PreKeyRecordStructure.newBuilder() to construct.
+ private PreKeyRecordStructure(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private PreKeyRecordStructure(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final PreKeyRecordStructure defaultInstance;
+ public static PreKeyRecordStructure getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public PreKeyRecordStructure getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private PreKeyRecordStructure(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ id_ = input.readUInt32();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ publicKey_ = input.readBytes();
+ break;
+ }
+ case 26: {
+ bitField0_ |= 0x00000004;
+ privateKey_ = input.readBytes();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_PreKeyRecordStructure_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_PreKeyRecordStructure_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.state.StorageProtos.PreKeyRecordStructure.class, org.session.libsignal.libsignal.state.StorageProtos.PreKeyRecordStructure.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional uint32 id = 1;
+ */
+ public boolean hasId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public int getId() {
+ return id_;
+ }
+
+ // optional bytes publicKey = 2;
+ public static final int PUBLICKEY_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString publicKey_;
+ /**
+ * optional bytes publicKey = 2;
+ */
+ public boolean hasPublicKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes publicKey = 2;
+ */
+ public com.google.protobuf.ByteString getPublicKey() {
+ return publicKey_;
+ }
+
+ // optional bytes privateKey = 3;
+ public static final int PRIVATEKEY_FIELD_NUMBER = 3;
+ private com.google.protobuf.ByteString privateKey_;
+ /**
+ * optional bytes privateKey = 3;
+ */
+ public boolean hasPrivateKey() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes privateKey = 3;
+ */
+ public com.google.protobuf.ByteString getPrivateKey() {
+ return privateKey_;
+ }
+
+ private void initFields() {
+ id_ = 0;
+ publicKey_ = com.google.protobuf.ByteString.EMPTY;
+ privateKey_ = com.google.protobuf.ByteString.EMPTY;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeUInt32(1, id_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, publicKey_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeBytes(3, privateKey_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, id_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, publicKey_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(3, privateKey_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.state.StorageProtos.PreKeyRecordStructure parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.PreKeyRecordStructure parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.PreKeyRecordStructure parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.PreKeyRecordStructure parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.PreKeyRecordStructure parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.PreKeyRecordStructure parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.PreKeyRecordStructure parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.PreKeyRecordStructure parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.PreKeyRecordStructure parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.PreKeyRecordStructure parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.state.StorageProtos.PreKeyRecordStructure prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.PreKeyRecordStructure}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional uint32 id = 1;
+ */
+ public boolean hasId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public int getId() {
+ return id_;
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public Builder setId(int value) {
+ bitField0_ |= 0x00000001;
+ id_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public Builder clearId() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ id_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional bytes publicKey = 2;
+ private com.google.protobuf.ByteString publicKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes publicKey = 2;
+ */
+ public boolean hasPublicKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes publicKey = 2;
+ */
+ public com.google.protobuf.ByteString getPublicKey() {
+ return publicKey_;
+ }
+ /**
+ * optional bytes publicKey = 2;
+ */
+ public Builder setPublicKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ publicKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes publicKey = 2;
+ */
+ public Builder clearPublicKey() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ publicKey_ = getDefaultInstance().getPublicKey();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes privateKey = 3;
+ private com.google.protobuf.ByteString privateKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes privateKey = 3;
+ */
+ public boolean hasPrivateKey() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes privateKey = 3;
+ */
+ public com.google.protobuf.ByteString getPrivateKey() {
+ return privateKey_;
+ }
+ /**
+ * optional bytes privateKey = 3;
+ */
+ public Builder setPrivateKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ privateKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes privateKey = 3;
+ */
+ public Builder clearPrivateKey() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ privateKey_ = getDefaultInstance().getPrivateKey();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.PreKeyRecordStructure)
+ }
+
+ static {
+ defaultInstance = new PreKeyRecordStructure(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.PreKeyRecordStructure)
+ }
+
+ public interface SignedPreKeyRecordStructureOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional uint32 id = 1;
+ /**
+ * optional uint32 id = 1;
+ */
+ boolean hasId();
+ /**
+ * optional uint32 id = 1;
+ */
+ int getId();
+
+ // optional bytes publicKey = 2;
+ /**
+ * optional bytes publicKey = 2;
+ */
+ boolean hasPublicKey();
+ /**
+ * optional bytes publicKey = 2;
+ */
+ com.google.protobuf.ByteString getPublicKey();
+
+ // optional bytes privateKey = 3;
+ /**
+ * optional bytes privateKey = 3;
+ */
+ boolean hasPrivateKey();
+ /**
+ * optional bytes privateKey = 3;
+ */
+ com.google.protobuf.ByteString getPrivateKey();
+
+ // optional bytes signature = 4;
+ /**
+ * optional bytes signature = 4;
+ */
+ boolean hasSignature();
+ /**
+ * optional bytes signature = 4;
+ */
+ com.google.protobuf.ByteString getSignature();
+
+ // optional fixed64 timestamp = 5;
+ /**
+ * optional fixed64 timestamp = 5;
+ */
+ boolean hasTimestamp();
+ /**
+ * optional fixed64 timestamp = 5;
+ */
+ long getTimestamp();
+ }
+ /**
+ * Protobuf type {@code textsecure.SignedPreKeyRecordStructure}
+ */
+ public static final class SignedPreKeyRecordStructure extends
+ com.google.protobuf.GeneratedMessage
+ implements SignedPreKeyRecordStructureOrBuilder {
+ // Use SignedPreKeyRecordStructure.newBuilder() to construct.
+ private SignedPreKeyRecordStructure(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private SignedPreKeyRecordStructure(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final SignedPreKeyRecordStructure defaultInstance;
+ public static SignedPreKeyRecordStructure getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public SignedPreKeyRecordStructure getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private SignedPreKeyRecordStructure(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ id_ = input.readUInt32();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ publicKey_ = input.readBytes();
+ break;
+ }
+ case 26: {
+ bitField0_ |= 0x00000004;
+ privateKey_ = input.readBytes();
+ break;
+ }
+ case 34: {
+ bitField0_ |= 0x00000008;
+ signature_ = input.readBytes();
+ break;
+ }
+ case 41: {
+ bitField0_ |= 0x00000010;
+ timestamp_ = input.readFixed64();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_SignedPreKeyRecordStructure_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_SignedPreKeyRecordStructure_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.state.StorageProtos.SignedPreKeyRecordStructure.class, org.session.libsignal.libsignal.state.StorageProtos.SignedPreKeyRecordStructure.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional uint32 id = 1;
+ */
+ public boolean hasId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public int getId() {
+ return id_;
+ }
+
+ // optional bytes publicKey = 2;
+ public static final int PUBLICKEY_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString publicKey_;
+ /**
+ * optional bytes publicKey = 2;
+ */
+ public boolean hasPublicKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes publicKey = 2;
+ */
+ public com.google.protobuf.ByteString getPublicKey() {
+ return publicKey_;
+ }
+
+ // optional bytes privateKey = 3;
+ public static final int PRIVATEKEY_FIELD_NUMBER = 3;
+ private com.google.protobuf.ByteString privateKey_;
+ /**
+ * optional bytes privateKey = 3;
+ */
+ public boolean hasPrivateKey() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes privateKey = 3;
+ */
+ public com.google.protobuf.ByteString getPrivateKey() {
+ return privateKey_;
+ }
+
+ // optional bytes signature = 4;
+ public static final int SIGNATURE_FIELD_NUMBER = 4;
+ private com.google.protobuf.ByteString signature_;
+ /**
+ * optional bytes signature = 4;
+ */
+ public boolean hasSignature() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional bytes signature = 4;
+ */
+ public com.google.protobuf.ByteString getSignature() {
+ return signature_;
+ }
+
+ // optional fixed64 timestamp = 5;
+ public static final int TIMESTAMP_FIELD_NUMBER = 5;
+ private long timestamp_;
+ /**
+ * optional fixed64 timestamp = 5;
+ */
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * optional fixed64 timestamp = 5;
+ */
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ private void initFields() {
+ id_ = 0;
+ publicKey_ = com.google.protobuf.ByteString.EMPTY;
+ privateKey_ = com.google.protobuf.ByteString.EMPTY;
+ signature_ = com.google.protobuf.ByteString.EMPTY;
+ timestamp_ = 0L;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeUInt32(1, id_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, publicKey_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeBytes(3, privateKey_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ output.writeBytes(4, signature_);
+ }
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ output.writeFixed64(5, timestamp_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, id_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, publicKey_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(3, privateKey_);
+ }
+ if (((bitField0_ & 0x00000008) == 0x00000008)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(4, signature_);
+ }
+ if (((bitField0_ & 0x00000010) == 0x00000010)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeFixed64Size(5, timestamp_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.state.StorageProtos.SignedPreKeyRecordStructure parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SignedPreKeyRecordStructure parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SignedPreKeyRecordStructure parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SignedPreKeyRecordStructure parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SignedPreKeyRecordStructure parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SignedPreKeyRecordStructure parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SignedPreKeyRecordStructure parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SignedPreKeyRecordStructure parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SignedPreKeyRecordStructure parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SignedPreKeyRecordStructure parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.state.StorageProtos.SignedPreKeyRecordStructure prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.SignedPreKeyRecordStructure}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional uint32 id = 1;
+ */
+ public boolean hasId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public int getId() {
+ return id_;
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public Builder setId(int value) {
+ bitField0_ |= 0x00000001;
+ id_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 id = 1;
+ */
+ public Builder clearId() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ id_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional bytes publicKey = 2;
+ private com.google.protobuf.ByteString publicKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes publicKey = 2;
+ */
+ public boolean hasPublicKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes publicKey = 2;
+ */
+ public com.google.protobuf.ByteString getPublicKey() {
+ return publicKey_;
+ }
+ /**
+ * optional bytes publicKey = 2;
+ */
+ public Builder setPublicKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ publicKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes publicKey = 2;
+ */
+ public Builder clearPublicKey() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ publicKey_ = getDefaultInstance().getPublicKey();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes privateKey = 3;
+ private com.google.protobuf.ByteString privateKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes privateKey = 3;
+ */
+ public boolean hasPrivateKey() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional bytes privateKey = 3;
+ */
+ public com.google.protobuf.ByteString getPrivateKey() {
+ return privateKey_;
+ }
+ /**
+ * optional bytes privateKey = 3;
+ */
+ public Builder setPrivateKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ privateKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes privateKey = 3;
+ */
+ public Builder clearPrivateKey() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ privateKey_ = getDefaultInstance().getPrivateKey();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes signature = 4;
+ private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes signature = 4;
+ */
+ public boolean hasSignature() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * optional bytes signature = 4;
+ */
+ public com.google.protobuf.ByteString getSignature() {
+ return signature_;
+ }
+ /**
+ * optional bytes signature = 4;
+ */
+ public Builder setSignature(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000008;
+ signature_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes signature = 4;
+ */
+ public Builder clearSignature() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ signature_ = getDefaultInstance().getSignature();
+ onChanged();
+ return this;
+ }
+
+ // optional fixed64 timestamp = 5;
+ private long timestamp_ ;
+ /**
+ * optional fixed64 timestamp = 5;
+ */
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000010) == 0x00000010);
+ }
+ /**
+ * optional fixed64 timestamp = 5;
+ */
+ public long getTimestamp() {
+ return timestamp_;
+ }
+ /**
+ * optional fixed64 timestamp = 5;
+ */
+ public Builder setTimestamp(long value) {
+ bitField0_ |= 0x00000010;
+ timestamp_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional fixed64 timestamp = 5;
+ */
+ public Builder clearTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ timestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.SignedPreKeyRecordStructure)
+ }
+
+ static {
+ defaultInstance = new SignedPreKeyRecordStructure(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.SignedPreKeyRecordStructure)
+ }
+
+ public interface IdentityKeyPairStructureOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional bytes publicKey = 1;
+ /**
+ * optional bytes publicKey = 1;
+ */
+ boolean hasPublicKey();
+ /**
+ * optional bytes publicKey = 1;
+ */
+ com.google.protobuf.ByteString getPublicKey();
+
+ // optional bytes privateKey = 2;
+ /**
+ * optional bytes privateKey = 2;
+ */
+ boolean hasPrivateKey();
+ /**
+ * optional bytes privateKey = 2;
+ */
+ com.google.protobuf.ByteString getPrivateKey();
+ }
+ /**
+ * Protobuf type {@code textsecure.IdentityKeyPairStructure}
+ */
+ public static final class IdentityKeyPairStructure extends
+ com.google.protobuf.GeneratedMessage
+ implements IdentityKeyPairStructureOrBuilder {
+ // Use IdentityKeyPairStructure.newBuilder() to construct.
+ private IdentityKeyPairStructure(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private IdentityKeyPairStructure(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final IdentityKeyPairStructure defaultInstance;
+ public static IdentityKeyPairStructure getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public IdentityKeyPairStructure getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private IdentityKeyPairStructure(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ bitField0_ |= 0x00000001;
+ publicKey_ = input.readBytes();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ privateKey_ = input.readBytes();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_IdentityKeyPairStructure_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_IdentityKeyPairStructure_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.state.StorageProtos.IdentityKeyPairStructure.class, org.session.libsignal.libsignal.state.StorageProtos.IdentityKeyPairStructure.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional bytes publicKey = 1;
+ */
+ public boolean hasPublicKey() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional bytes publicKey = 1;
+ */
+ public com.google.protobuf.ByteString getPublicKey() {
+ return publicKey_;
+ }
+
+ // optional bytes privateKey = 2;
+ public static final int PRIVATEKEY_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString privateKey_;
+ /**
+ * optional bytes privateKey = 2;
+ */
+ public boolean hasPrivateKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes privateKey = 2;
+ */
+ public com.google.protobuf.ByteString getPrivateKey() {
+ return privateKey_;
+ }
+
+ private void initFields() {
+ publicKey_ = com.google.protobuf.ByteString.EMPTY;
+ privateKey_ = com.google.protobuf.ByteString.EMPTY;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeBytes(1, publicKey_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, privateKey_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(1, publicKey_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, privateKey_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.state.StorageProtos.IdentityKeyPairStructure parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.IdentityKeyPairStructure parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.IdentityKeyPairStructure parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.IdentityKeyPairStructure parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.IdentityKeyPairStructure parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.IdentityKeyPairStructure parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.IdentityKeyPairStructure parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.IdentityKeyPairStructure parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.IdentityKeyPairStructure parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.IdentityKeyPairStructure parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.state.StorageProtos.IdentityKeyPairStructure prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.IdentityKeyPairStructure}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional bytes publicKey = 1;
+ */
+ public boolean hasPublicKey() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional bytes publicKey = 1;
+ */
+ public com.google.protobuf.ByteString getPublicKey() {
+ return publicKey_;
+ }
+ /**
+ * optional bytes publicKey = 1;
+ */
+ public Builder setPublicKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ publicKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes publicKey = 1;
+ */
+ public Builder clearPublicKey() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ publicKey_ = getDefaultInstance().getPublicKey();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes privateKey = 2;
+ private com.google.protobuf.ByteString privateKey_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes privateKey = 2;
+ */
+ public boolean hasPrivateKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes privateKey = 2;
+ */
+ public com.google.protobuf.ByteString getPrivateKey() {
+ return privateKey_;
+ }
+ /**
+ * optional bytes privateKey = 2;
+ */
+ public Builder setPrivateKey(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ privateKey_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes privateKey = 2;
+ */
+ public Builder clearPrivateKey() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ privateKey_ = getDefaultInstance().getPrivateKey();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.IdentityKeyPairStructure)
+ }
+
+ static {
+ defaultInstance = new IdentityKeyPairStructure(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.IdentityKeyPairStructure)
+ }
+
+ public interface SenderKeyStateStructureOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional uint32 senderKeyId = 1;
+ /**
+ * optional uint32 senderKeyId = 1;
+ */
+ boolean hasSenderKeyId();
+ /**
+ * optional uint32 senderKeyId = 1;
+ */
+ int getSenderKeyId();
+
+ // optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ */
+ boolean hasSenderChainKey();
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey getSenderChainKey();
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKeyOrBuilder getSenderChainKeyOrBuilder();
+
+ // optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ */
+ boolean hasSenderSigningKey();
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey getSenderSigningKey();
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKeyOrBuilder getSenderSigningKeyOrBuilder();
+
+ // repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ java.util.Listrepeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey getSenderMessageKeys(int index);
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ int getSenderMessageKeysCount();
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ java.util.List extends org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKeyOrBuilder>
+ getSenderMessageKeysOrBuilderList();
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKeyOrBuilder getSenderMessageKeysOrBuilder(
+ int index);
+ }
+ /**
+ * Protobuf type {@code textsecure.SenderKeyStateStructure}
+ */
+ public static final class SenderKeyStateStructure extends
+ com.google.protobuf.GeneratedMessage
+ implements SenderKeyStateStructureOrBuilder {
+ // Use SenderKeyStateStructure.newBuilder() to construct.
+ private SenderKeyStateStructure(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private SenderKeyStateStructure(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final SenderKeyStateStructure defaultInstance;
+ public static SenderKeyStateStructure getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public SenderKeyStateStructure getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private SenderKeyStateStructure(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ senderKeyId_ = input.readUInt32();
+ break;
+ }
+ case 18: {
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ subBuilder = senderChainKey_.toBuilder();
+ }
+ senderChainKey_ = input.readMessage(org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(senderChainKey_);
+ senderChainKey_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000002;
+ break;
+ }
+ case 26: {
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ subBuilder = senderSigningKey_.toBuilder();
+ }
+ senderSigningKey_ = input.readMessage(org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(senderSigningKey_);
+ senderSigningKey_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000004;
+ break;
+ }
+ case 34: {
+ if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
+ senderMessageKeys_ = new java.util.ArrayListoptional uint32 iteration = 1;
+ */
+ boolean hasIteration();
+ /**
+ * optional uint32 iteration = 1;
+ */
+ int getIteration();
+
+ // optional bytes seed = 2;
+ /**
+ * optional bytes seed = 2;
+ */
+ boolean hasSeed();
+ /**
+ * optional bytes seed = 2;
+ */
+ com.google.protobuf.ByteString getSeed();
+ }
+ /**
+ * Protobuf type {@code textsecure.SenderKeyStateStructure.SenderChainKey}
+ */
+ public static final class SenderChainKey extends
+ com.google.protobuf.GeneratedMessage
+ implements SenderChainKeyOrBuilder {
+ // Use SenderChainKey.newBuilder() to construct.
+ private SenderChainKey(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private SenderChainKey(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final SenderChainKey defaultInstance;
+ public static SenderChainKey getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public SenderChainKey getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private SenderChainKey(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ iteration_ = input.readUInt32();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ seed_ = input.readBytes();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_SenderKeyStateStructure_SenderChainKey_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_SenderKeyStateStructure_SenderChainKey_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey.class, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional uint32 iteration = 1;
+ */
+ public boolean hasIteration() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 iteration = 1;
+ */
+ public int getIteration() {
+ return iteration_;
+ }
+
+ // optional bytes seed = 2;
+ public static final int SEED_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString seed_;
+ /**
+ * optional bytes seed = 2;
+ */
+ public boolean hasSeed() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes seed = 2;
+ */
+ public com.google.protobuf.ByteString getSeed() {
+ return seed_;
+ }
+
+ private void initFields() {
+ iteration_ = 0;
+ seed_ = com.google.protobuf.ByteString.EMPTY;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeUInt32(1, iteration_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, seed_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, iteration_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, seed_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.SenderKeyStateStructure.SenderChainKey}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional uint32 iteration = 1;
+ */
+ public boolean hasIteration() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 iteration = 1;
+ */
+ public int getIteration() {
+ return iteration_;
+ }
+ /**
+ * optional uint32 iteration = 1;
+ */
+ public Builder setIteration(int value) {
+ bitField0_ |= 0x00000001;
+ iteration_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 iteration = 1;
+ */
+ public Builder clearIteration() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ iteration_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional bytes seed = 2;
+ private com.google.protobuf.ByteString seed_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes seed = 2;
+ */
+ public boolean hasSeed() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes seed = 2;
+ */
+ public com.google.protobuf.ByteString getSeed() {
+ return seed_;
+ }
+ /**
+ * optional bytes seed = 2;
+ */
+ public Builder setSeed(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ seed_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes seed = 2;
+ */
+ public Builder clearSeed() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ seed_ = getDefaultInstance().getSeed();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.SenderKeyStateStructure.SenderChainKey)
+ }
+
+ static {
+ defaultInstance = new SenderChainKey(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.SenderKeyStateStructure.SenderChainKey)
+ }
+
+ public interface SenderMessageKeyOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional uint32 iteration = 1;
+ /**
+ * optional uint32 iteration = 1;
+ */
+ boolean hasIteration();
+ /**
+ * optional uint32 iteration = 1;
+ */
+ int getIteration();
+
+ // optional bytes seed = 2;
+ /**
+ * optional bytes seed = 2;
+ */
+ boolean hasSeed();
+ /**
+ * optional bytes seed = 2;
+ */
+ com.google.protobuf.ByteString getSeed();
+ }
+ /**
+ * Protobuf type {@code textsecure.SenderKeyStateStructure.SenderMessageKey}
+ */
+ public static final class SenderMessageKey extends
+ com.google.protobuf.GeneratedMessage
+ implements SenderMessageKeyOrBuilder {
+ // Use SenderMessageKey.newBuilder() to construct.
+ private SenderMessageKey(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private SenderMessageKey(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final SenderMessageKey defaultInstance;
+ public static SenderMessageKey getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public SenderMessageKey getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private SenderMessageKey(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ iteration_ = input.readUInt32();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ seed_ = input.readBytes();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_SenderKeyStateStructure_SenderMessageKey_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_SenderKeyStateStructure_SenderMessageKey_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey.class, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional uint32 iteration = 1;
+ */
+ public boolean hasIteration() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 iteration = 1;
+ */
+ public int getIteration() {
+ return iteration_;
+ }
+
+ // optional bytes seed = 2;
+ public static final int SEED_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString seed_;
+ /**
+ * optional bytes seed = 2;
+ */
+ public boolean hasSeed() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes seed = 2;
+ */
+ public com.google.protobuf.ByteString getSeed() {
+ return seed_;
+ }
+
+ private void initFields() {
+ iteration_ = 0;
+ seed_ = com.google.protobuf.ByteString.EMPTY;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeUInt32(1, iteration_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, seed_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, iteration_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, seed_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.SenderKeyStateStructure.SenderMessageKey}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional uint32 iteration = 1;
+ */
+ public boolean hasIteration() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 iteration = 1;
+ */
+ public int getIteration() {
+ return iteration_;
+ }
+ /**
+ * optional uint32 iteration = 1;
+ */
+ public Builder setIteration(int value) {
+ bitField0_ |= 0x00000001;
+ iteration_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 iteration = 1;
+ */
+ public Builder clearIteration() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ iteration_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional bytes seed = 2;
+ private com.google.protobuf.ByteString seed_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes seed = 2;
+ */
+ public boolean hasSeed() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes seed = 2;
+ */
+ public com.google.protobuf.ByteString getSeed() {
+ return seed_;
+ }
+ /**
+ * optional bytes seed = 2;
+ */
+ public Builder setSeed(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ seed_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes seed = 2;
+ */
+ public Builder clearSeed() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ seed_ = getDefaultInstance().getSeed();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.SenderKeyStateStructure.SenderMessageKey)
+ }
+
+ static {
+ defaultInstance = new SenderMessageKey(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.SenderKeyStateStructure.SenderMessageKey)
+ }
+
+ public interface SenderSigningKeyOrBuilder
+ extends com.google.protobuf.MessageOrBuilder {
+
+ // optional bytes public = 1;
+ /**
+ * optional bytes public = 1;
+ */
+ boolean hasPublic();
+ /**
+ * optional bytes public = 1;
+ */
+ com.google.protobuf.ByteString getPublic();
+
+ // optional bytes private = 2;
+ /**
+ * optional bytes private = 2;
+ */
+ boolean hasPrivate();
+ /**
+ * optional bytes private = 2;
+ */
+ com.google.protobuf.ByteString getPrivate();
+ }
+ /**
+ * Protobuf type {@code textsecure.SenderKeyStateStructure.SenderSigningKey}
+ */
+ public static final class SenderSigningKey extends
+ com.google.protobuf.GeneratedMessage
+ implements SenderSigningKeyOrBuilder {
+ // Use SenderSigningKey.newBuilder() to construct.
+ private SenderSigningKey(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private SenderSigningKey(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final SenderSigningKey defaultInstance;
+ public static SenderSigningKey getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public SenderSigningKey getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private SenderSigningKey(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ bitField0_ |= 0x00000001;
+ public_ = input.readBytes();
+ break;
+ }
+ case 18: {
+ bitField0_ |= 0x00000002;
+ private_ = input.readBytes();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_SenderKeyStateStructure_SenderSigningKey_descriptor;
+ }
+
+ protected FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.session.libsignal.libsignal.state.StorageProtos.internal_static_textsecure_SenderKeyStateStructure_SenderSigningKey_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey.class, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey.Builder.class);
+ }
+
+ public static com.google.protobuf.Parseroptional bytes public = 1;
+ */
+ public boolean hasPublic() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional bytes public = 1;
+ */
+ public com.google.protobuf.ByteString getPublic() {
+ return public_;
+ }
+
+ // optional bytes private = 2;
+ public static final int PRIVATE_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString private_;
+ /**
+ * optional bytes private = 2;
+ */
+ public boolean hasPrivate() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes private = 2;
+ */
+ public com.google.protobuf.ByteString getPrivate() {
+ return private_;
+ }
+
+ private void initFields() {
+ public_ = com.google.protobuf.ByteString.EMPTY;
+ private_ = com.google.protobuf.ByteString.EMPTY;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeBytes(1, public_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, private_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(1, public_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, private_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.SenderKeyStateStructure.SenderSigningKey}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional bytes public = 1;
+ */
+ public boolean hasPublic() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional bytes public = 1;
+ */
+ public com.google.protobuf.ByteString getPublic() {
+ return public_;
+ }
+ /**
+ * optional bytes public = 1;
+ */
+ public Builder setPublic(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ public_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes public = 1;
+ */
+ public Builder clearPublic() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ public_ = getDefaultInstance().getPublic();
+ onChanged();
+ return this;
+ }
+
+ // optional bytes private = 2;
+ private com.google.protobuf.ByteString private_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ * optional bytes private = 2;
+ */
+ public boolean hasPrivate() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional bytes private = 2;
+ */
+ public com.google.protobuf.ByteString getPrivate() {
+ return private_;
+ }
+ /**
+ * optional bytes private = 2;
+ */
+ public Builder setPrivate(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ private_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional bytes private = 2;
+ */
+ public Builder clearPrivate() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ private_ = getDefaultInstance().getPrivate();
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:textsecure.SenderKeyStateStructure.SenderSigningKey)
+ }
+
+ static {
+ defaultInstance = new SenderSigningKey(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:textsecure.SenderKeyStateStructure.SenderSigningKey)
+ }
+
+ private int bitField0_;
+ // optional uint32 senderKeyId = 1;
+ public static final int SENDERKEYID_FIELD_NUMBER = 1;
+ private int senderKeyId_;
+ /**
+ * optional uint32 senderKeyId = 1;
+ */
+ public boolean hasSenderKeyId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 senderKeyId = 1;
+ */
+ public int getSenderKeyId() {
+ return senderKeyId_;
+ }
+
+ // optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ public static final int SENDERCHAINKEY_FIELD_NUMBER = 2;
+ private org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey senderChainKey_;
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ */
+ public boolean hasSenderChainKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey getSenderChainKey() {
+ return senderChainKey_;
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKeyOrBuilder getSenderChainKeyOrBuilder() {
+ return senderChainKey_;
+ }
+
+ // optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ public static final int SENDERSIGNINGKEY_FIELD_NUMBER = 3;
+ private org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey senderSigningKey_;
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ */
+ public boolean hasSenderSigningKey() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey getSenderSigningKey() {
+ return senderSigningKey_;
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKeyOrBuilder getSenderSigningKeyOrBuilder() {
+ return senderSigningKey_;
+ }
+
+ // repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ public static final int SENDERMESSAGEKEYS_FIELD_NUMBER = 4;
+ private java.util.Listrepeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public java.util.Listrepeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public java.util.List extends org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKeyOrBuilder>
+ getSenderMessageKeysOrBuilderList() {
+ return senderMessageKeys_;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public int getSenderMessageKeysCount() {
+ return senderMessageKeys_.size();
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey getSenderMessageKeys(int index) {
+ return senderMessageKeys_.get(index);
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKeyOrBuilder getSenderMessageKeysOrBuilder(
+ int index) {
+ return senderMessageKeys_.get(index);
+ }
+
+ private void initFields() {
+ senderKeyId_ = 0;
+ senderChainKey_ = org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey.getDefaultInstance();
+ senderSigningKey_ = org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey.getDefaultInstance();
+ senderMessageKeys_ = java.util.Collections.emptyList();
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeUInt32(1, senderKeyId_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeMessage(2, senderChainKey_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeMessage(3, senderSigningKey_);
+ }
+ for (int i = 0; i < senderMessageKeys_.size(); i++) {
+ output.writeMessage(4, senderMessageKeys_.get(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(1, senderKeyId_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, senderChainKey_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, senderSigningKey_);
+ }
+ for (int i = 0; i < senderMessageKeys_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, senderMessageKeys_.get(i));
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.SenderKeyStateStructure}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderoptional uint32 senderKeyId = 1;
+ */
+ public boolean hasSenderKeyId() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * optional uint32 senderKeyId = 1;
+ */
+ public int getSenderKeyId() {
+ return senderKeyId_;
+ }
+ /**
+ * optional uint32 senderKeyId = 1;
+ */
+ public Builder setSenderKeyId(int value) {
+ bitField0_ |= 0x00000001;
+ senderKeyId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional uint32 senderKeyId = 1;
+ */
+ public Builder clearSenderKeyId() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ senderKeyId_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ private org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey senderChainKey_ = org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey.getDefaultInstance();
+ private com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey.Builder, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKeyOrBuilder> senderChainKeyBuilder_;
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ */
+ public boolean hasSenderChainKey() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey getSenderChainKey() {
+ if (senderChainKeyBuilder_ == null) {
+ return senderChainKey_;
+ } else {
+ return senderChainKeyBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ */
+ public Builder setSenderChainKey(org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey value) {
+ if (senderChainKeyBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ senderChainKey_ = value;
+ onChanged();
+ } else {
+ senderChainKeyBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ */
+ public Builder setSenderChainKey(
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey.Builder builderForValue) {
+ if (senderChainKeyBuilder_ == null) {
+ senderChainKey_ = builderForValue.build();
+ onChanged();
+ } else {
+ senderChainKeyBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ */
+ public Builder mergeSenderChainKey(org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey value) {
+ if (senderChainKeyBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) == 0x00000002) &&
+ senderChainKey_ != org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey.getDefaultInstance()) {
+ senderChainKey_ =
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey.newBuilder(senderChainKey_).mergeFrom(value).buildPartial();
+ } else {
+ senderChainKey_ = value;
+ }
+ onChanged();
+ } else {
+ senderChainKeyBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ */
+ public Builder clearSenderChainKey() {
+ if (senderChainKeyBuilder_ == null) {
+ senderChainKey_ = org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey.getDefaultInstance();
+ onChanged();
+ } else {
+ senderChainKeyBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey.Builder getSenderChainKeyBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getSenderChainKeyFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKeyOrBuilder getSenderChainKeyOrBuilder() {
+ if (senderChainKeyBuilder_ != null) {
+ return senderChainKeyBuilder_.getMessageOrBuilder();
+ } else {
+ return senderChainKey_;
+ }
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey.Builder, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKeyOrBuilder>
+ getSenderChainKeyFieldBuilder() {
+ if (senderChainKeyBuilder_ == null) {
+ senderChainKeyBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKey.Builder, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderChainKeyOrBuilder>(
+ senderChainKey_,
+ getParentForChildren(),
+ isClean());
+ senderChainKey_ = null;
+ }
+ return senderChainKeyBuilder_;
+ }
+
+ // optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ private org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey senderSigningKey_ = org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey.getDefaultInstance();
+ private com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey.Builder, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKeyOrBuilder> senderSigningKeyBuilder_;
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ */
+ public boolean hasSenderSigningKey() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey getSenderSigningKey() {
+ if (senderSigningKeyBuilder_ == null) {
+ return senderSigningKey_;
+ } else {
+ return senderSigningKeyBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ */
+ public Builder setSenderSigningKey(org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey value) {
+ if (senderSigningKeyBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ senderSigningKey_ = value;
+ onChanged();
+ } else {
+ senderSigningKeyBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000004;
+ return this;
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ */
+ public Builder setSenderSigningKey(
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey.Builder builderForValue) {
+ if (senderSigningKeyBuilder_ == null) {
+ senderSigningKey_ = builderForValue.build();
+ onChanged();
+ } else {
+ senderSigningKeyBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000004;
+ return this;
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ */
+ public Builder mergeSenderSigningKey(org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey value) {
+ if (senderSigningKeyBuilder_ == null) {
+ if (((bitField0_ & 0x00000004) == 0x00000004) &&
+ senderSigningKey_ != org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey.getDefaultInstance()) {
+ senderSigningKey_ =
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey.newBuilder(senderSigningKey_).mergeFrom(value).buildPartial();
+ } else {
+ senderSigningKey_ = value;
+ }
+ onChanged();
+ } else {
+ senderSigningKeyBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000004;
+ return this;
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ */
+ public Builder clearSenderSigningKey() {
+ if (senderSigningKeyBuilder_ == null) {
+ senderSigningKey_ = org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey.getDefaultInstance();
+ onChanged();
+ } else {
+ senderSigningKeyBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000004);
+ return this;
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey.Builder getSenderSigningKeyBuilder() {
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return getSenderSigningKeyFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKeyOrBuilder getSenderSigningKeyOrBuilder() {
+ if (senderSigningKeyBuilder_ != null) {
+ return senderSigningKeyBuilder_.getMessageOrBuilder();
+ } else {
+ return senderSigningKey_;
+ }
+ }
+ /**
+ * optional .textsecure.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey.Builder, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKeyOrBuilder>
+ getSenderSigningKeyFieldBuilder() {
+ if (senderSigningKeyBuilder_ == null) {
+ senderSigningKeyBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKey.Builder, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderSigningKeyOrBuilder>(
+ senderSigningKey_,
+ getParentForChildren(),
+ isClean());
+ senderSigningKey_ = null;
+ }
+ return senderSigningKeyBuilder_;
+ }
+
+ // repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ private java.util.Listrepeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public java.util.Listrepeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public int getSenderMessageKeysCount() {
+ if (senderMessageKeysBuilder_ == null) {
+ return senderMessageKeys_.size();
+ } else {
+ return senderMessageKeysBuilder_.getCount();
+ }
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey getSenderMessageKeys(int index) {
+ if (senderMessageKeysBuilder_ == null) {
+ return senderMessageKeys_.get(index);
+ } else {
+ return senderMessageKeysBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public Builder setSenderMessageKeys(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey value) {
+ if (senderMessageKeysBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSenderMessageKeysIsMutable();
+ senderMessageKeys_.set(index, value);
+ onChanged();
+ } else {
+ senderMessageKeysBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public Builder setSenderMessageKeys(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey.Builder builderForValue) {
+ if (senderMessageKeysBuilder_ == null) {
+ ensureSenderMessageKeysIsMutable();
+ senderMessageKeys_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ senderMessageKeysBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public Builder addSenderMessageKeys(org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey value) {
+ if (senderMessageKeysBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSenderMessageKeysIsMutable();
+ senderMessageKeys_.add(value);
+ onChanged();
+ } else {
+ senderMessageKeysBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public Builder addSenderMessageKeys(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey value) {
+ if (senderMessageKeysBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSenderMessageKeysIsMutable();
+ senderMessageKeys_.add(index, value);
+ onChanged();
+ } else {
+ senderMessageKeysBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public Builder addSenderMessageKeys(
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey.Builder builderForValue) {
+ if (senderMessageKeysBuilder_ == null) {
+ ensureSenderMessageKeysIsMutable();
+ senderMessageKeys_.add(builderForValue.build());
+ onChanged();
+ } else {
+ senderMessageKeysBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public Builder addSenderMessageKeys(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey.Builder builderForValue) {
+ if (senderMessageKeysBuilder_ == null) {
+ ensureSenderMessageKeysIsMutable();
+ senderMessageKeys_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ senderMessageKeysBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public Builder addAllSenderMessageKeys(
+ Iterable extends org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey> values) {
+ if (senderMessageKeysBuilder_ == null) {
+ ensureSenderMessageKeysIsMutable();
+ super.addAll(values, senderMessageKeys_);
+ onChanged();
+ } else {
+ senderMessageKeysBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public Builder clearSenderMessageKeys() {
+ if (senderMessageKeysBuilder_ == null) {
+ senderMessageKeys_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ } else {
+ senderMessageKeysBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public Builder removeSenderMessageKeys(int index) {
+ if (senderMessageKeysBuilder_ == null) {
+ ensureSenderMessageKeysIsMutable();
+ senderMessageKeys_.remove(index);
+ onChanged();
+ } else {
+ senderMessageKeysBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey.Builder getSenderMessageKeysBuilder(
+ int index) {
+ return getSenderMessageKeysFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKeyOrBuilder getSenderMessageKeysOrBuilder(
+ int index) {
+ if (senderMessageKeysBuilder_ == null) {
+ return senderMessageKeys_.get(index); } else {
+ return senderMessageKeysBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public java.util.List extends org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKeyOrBuilder>
+ getSenderMessageKeysOrBuilderList() {
+ if (senderMessageKeysBuilder_ != null) {
+ return senderMessageKeysBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(senderMessageKeys_);
+ }
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey.Builder addSenderMessageKeysBuilder() {
+ return getSenderMessageKeysFieldBuilder().addBuilder(
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey.getDefaultInstance());
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey.Builder addSenderMessageKeysBuilder(
+ int index) {
+ return getSenderMessageKeysFieldBuilder().addBuilder(
+ index, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.SenderMessageKey.getDefaultInstance());
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;
+ */
+ public java.util.Listrepeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ java.util.Listrepeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure getSenderKeyStates(int index);
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ int getSenderKeyStatesCount();
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ java.util.List extends org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructureOrBuilder>
+ getSenderKeyStatesOrBuilderList();
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructureOrBuilder getSenderKeyStatesOrBuilder(
+ int index);
+ }
+ /**
+ * Protobuf type {@code textsecure.SenderKeyRecordStructure}
+ */
+ public static final class SenderKeyRecordStructure extends
+ com.google.protobuf.GeneratedMessage
+ implements SenderKeyRecordStructureOrBuilder {
+ // Use SenderKeyRecordStructure.newBuilder() to construct.
+ private SenderKeyRecordStructure(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private SenderKeyRecordStructure(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final SenderKeyRecordStructure defaultInstance;
+ public static SenderKeyRecordStructure getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public SenderKeyRecordStructure getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final com.google.protobuf.UnknownFieldSet unknownFields;
+ @Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private SenderKeyRecordStructure(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+ senderKeyStates_ = new java.util.ArrayListrepeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public java.util.Listrepeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public java.util.List extends org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructureOrBuilder>
+ getSenderKeyStatesOrBuilderList() {
+ return senderKeyStates_;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public int getSenderKeyStatesCount() {
+ return senderKeyStates_.size();
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure getSenderKeyStates(int index) {
+ return senderKeyStates_.get(index);
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructureOrBuilder getSenderKeyStatesOrBuilder(
+ int index) {
+ return senderKeyStates_.get(index);
+ }
+
+ private void initFields() {
+ senderKeyStates_ = java.util.Collections.emptyList();
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized != -1) return isInitialized == 1;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ for (int i = 0; i < senderKeyStates_.size(); i++) {
+ output.writeMessage(1, senderKeyStates_.get(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < senderKeyStates_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, senderKeyStates_.get(i));
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @Override
+ protected Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyRecordStructure parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyRecordStructure parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyRecordStructure parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyRecordStructure parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyRecordStructure parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyRecordStructure parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyRecordStructure parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyRecordStructure parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyRecordStructure parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.session.libsignal.libsignal.state.StorageProtos.SenderKeyRecordStructure parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.session.libsignal.libsignal.state.StorageProtos.SenderKeyRecordStructure prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @Override
+ protected Builder newBuilderForType(
+ BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code textsecure.SenderKeyRecordStructure}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builderrepeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public java.util.Listrepeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public int getSenderKeyStatesCount() {
+ if (senderKeyStatesBuilder_ == null) {
+ return senderKeyStates_.size();
+ } else {
+ return senderKeyStatesBuilder_.getCount();
+ }
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure getSenderKeyStates(int index) {
+ if (senderKeyStatesBuilder_ == null) {
+ return senderKeyStates_.get(index);
+ } else {
+ return senderKeyStatesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public Builder setSenderKeyStates(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure value) {
+ if (senderKeyStatesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSenderKeyStatesIsMutable();
+ senderKeyStates_.set(index, value);
+ onChanged();
+ } else {
+ senderKeyStatesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public Builder setSenderKeyStates(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.Builder builderForValue) {
+ if (senderKeyStatesBuilder_ == null) {
+ ensureSenderKeyStatesIsMutable();
+ senderKeyStates_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ senderKeyStatesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public Builder addSenderKeyStates(org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure value) {
+ if (senderKeyStatesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSenderKeyStatesIsMutable();
+ senderKeyStates_.add(value);
+ onChanged();
+ } else {
+ senderKeyStatesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public Builder addSenderKeyStates(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure value) {
+ if (senderKeyStatesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSenderKeyStatesIsMutable();
+ senderKeyStates_.add(index, value);
+ onChanged();
+ } else {
+ senderKeyStatesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public Builder addSenderKeyStates(
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.Builder builderForValue) {
+ if (senderKeyStatesBuilder_ == null) {
+ ensureSenderKeyStatesIsMutable();
+ senderKeyStates_.add(builderForValue.build());
+ onChanged();
+ } else {
+ senderKeyStatesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public Builder addSenderKeyStates(
+ int index, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.Builder builderForValue) {
+ if (senderKeyStatesBuilder_ == null) {
+ ensureSenderKeyStatesIsMutable();
+ senderKeyStates_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ senderKeyStatesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public Builder addAllSenderKeyStates(
+ Iterable extends org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure> values) {
+ if (senderKeyStatesBuilder_ == null) {
+ ensureSenderKeyStatesIsMutable();
+ super.addAll(values, senderKeyStates_);
+ onChanged();
+ } else {
+ senderKeyStatesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public Builder clearSenderKeyStates() {
+ if (senderKeyStatesBuilder_ == null) {
+ senderKeyStates_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ senderKeyStatesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public Builder removeSenderKeyStates(int index) {
+ if (senderKeyStatesBuilder_ == null) {
+ ensureSenderKeyStatesIsMutable();
+ senderKeyStates_.remove(index);
+ onChanged();
+ } else {
+ senderKeyStatesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.Builder getSenderKeyStatesBuilder(
+ int index) {
+ return getSenderKeyStatesFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructureOrBuilder getSenderKeyStatesOrBuilder(
+ int index) {
+ if (senderKeyStatesBuilder_ == null) {
+ return senderKeyStates_.get(index); } else {
+ return senderKeyStatesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public java.util.List extends org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructureOrBuilder>
+ getSenderKeyStatesOrBuilderList() {
+ if (senderKeyStatesBuilder_ != null) {
+ return senderKeyStatesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(senderKeyStates_);
+ }
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.Builder addSenderKeyStatesBuilder() {
+ return getSenderKeyStatesFieldBuilder().addBuilder(
+ org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.getDefaultInstance());
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.Builder addSenderKeyStatesBuilder(
+ int index) {
+ return getSenderKeyStatesFieldBuilder().addBuilder(
+ index, org.session.libsignal.libsignal.state.StorageProtos.SenderKeyStateStructure.getDefaultInstance());
+ }
+ /**
+ * repeated .textsecure.SenderKeyStateStructure senderKeyStates = 1;
+ */
+ public java.util.List