// Generated by the protocol buffer compiler. DO NOT EDIT! // source: LocalStorageProtocol.proto package org.whispersystems.textsecure.storage; public final class StorageProtos { private StorageProtos() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } public interface SessionStructureOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional uint32 sessionVersion = 1; boolean hasSessionVersion(); int getSessionVersion(); // optional bytes localIdentityPublic = 2; boolean hasLocalIdentityPublic(); com.google.protobuf.ByteString getLocalIdentityPublic(); // optional bytes remoteIdentityPublic = 3; boolean hasRemoteIdentityPublic(); com.google.protobuf.ByteString getRemoteIdentityPublic(); // optional bytes rootKey = 4; boolean hasRootKey(); com.google.protobuf.ByteString getRootKey(); // optional uint32 previousCounter = 5; boolean hasPreviousCounter(); int getPreviousCounter(); // optional .textsecure.SessionStructure.Chain senderChain = 6; boolean hasSenderChain(); org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain getSenderChain(); org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.ChainOrBuilder getSenderChainOrBuilder(); // repeated .textsecure.SessionStructure.Chain receiverChains = 7; java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain> getReceiverChainsList(); org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain getReceiverChains(int index); int getReceiverChainsCount(); java.util.List<? extends org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.ChainOrBuilder> getReceiverChainsOrBuilderList(); org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.ChainOrBuilder getReceiverChainsOrBuilder( int index); // optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8; boolean hasPendingKeyExchange(); org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange getPendingKeyExchange(); org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchangeOrBuilder getPendingKeyExchangeOrBuilder(); // optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9; boolean hasPendingPreKey(); org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey getPendingPreKey(); org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKeyOrBuilder getPendingPreKeyOrBuilder(); // optional uint32 remoteRegistrationId = 10; boolean hasRemoteRegistrationId(); int getRemoteRegistrationId(); // optional uint32 localRegistrationId = 11; boolean hasLocalRegistrationId(); int getLocalRegistrationId(); // optional bool needsRefresh = 12; boolean hasNeedsRefresh(); boolean getNeedsRefresh(); } public static final class SessionStructure extends com.google.protobuf.GeneratedMessage implements SessionStructureOrBuilder { // Use SessionStructure.newBuilder() to construct. private SessionStructure(Builder builder) { super(builder); } private SessionStructure(boolean noInit) {} private static final SessionStructure defaultInstance; public static SessionStructure getDefaultInstance() { return defaultInstance; } public SessionStructure getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_fieldAccessorTable; } public interface ChainOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional bytes senderEphemeral = 1; boolean hasSenderEphemeral(); com.google.protobuf.ByteString getSenderEphemeral(); // optional bytes senderEphemeralPrivate = 2; boolean hasSenderEphemeralPrivate(); com.google.protobuf.ByteString getSenderEphemeralPrivate(); // optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3; boolean hasChainKey(); org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey getChainKey(); org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKeyOrBuilder getChainKeyOrBuilder(); // repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4; java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey> getMessageKeysList(); org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey getMessageKeys(int index); int getMessageKeysCount(); java.util.List<? extends org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKeyOrBuilder> getMessageKeysOrBuilderList(); org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKeyOrBuilder getMessageKeysOrBuilder( int index); } public static final class Chain extends com.google.protobuf.GeneratedMessage implements ChainOrBuilder { // Use Chain.newBuilder() to construct. private Chain(Builder builder) { super(builder); } private Chain(boolean noInit) {} private static final Chain defaultInstance; public static Chain getDefaultInstance() { return defaultInstance; } public Chain getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_Chain_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_Chain_fieldAccessorTable; } public interface ChainKeyOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional uint32 index = 1; boolean hasIndex(); int getIndex(); // optional bytes key = 2; boolean hasKey(); com.google.protobuf.ByteString getKey(); } public static final class ChainKey extends com.google.protobuf.GeneratedMessage implements ChainKeyOrBuilder { // Use ChainKey.newBuilder() to construct. private ChainKey(Builder builder) { super(builder); } private ChainKey(boolean noInit) {} private static final ChainKey defaultInstance; public static ChainKey getDefaultInstance() { return defaultInstance; } public ChainKey getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_Chain_ChainKey_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_Chain_ChainKey_fieldAccessorTable; } private int bitField0_; // optional uint32 index = 1; public static final int INDEX_FIELD_NUMBER = 1; private int index_; public boolean hasIndex() { return ((bitField0_ & 0x00000001) == 0x00000001); } public int getIndex() { return index_; } // optional bytes key = 2; public static final int KEY_FIELD_NUMBER = 2; private com.google.protobuf.ByteString key_; public boolean hasKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } 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; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { return builder.buildParsed(); } else { return null; } } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input, extensionRegistry)) { return builder.buildParsed(); } else { return null; } } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKeyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_Chain_ChainKey_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_Chain_ChainKey_fieldAccessorTable; } // Construct using org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); index_ = 0; bitField0_ = (bitField0_ & ~0x00000001); key_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.getDescriptor(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey getDefaultInstanceForType() { return org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.getDefaultInstance(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey build() { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } private org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } return result; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey buildPartial() { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey result = new org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.index_ = index_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.key_ = key_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey) { return mergeFrom((org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey other) { if (other == org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.getDefaultInstance()) return this; if (other.hasIndex()) { setIndex(other.getIndex()); } if (other.hasKey()) { setKey(other.getKey()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder( this.getUnknownFields()); while (true) { int tag = input.readTag(); switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); onChanged(); return this; } break; } case 8: { bitField0_ |= 0x00000001; index_ = input.readUInt32(); break; } case 18: { bitField0_ |= 0x00000002; key_ = input.readBytes(); break; } } } } private int bitField0_; // optional uint32 index = 1; private int index_ ; public boolean hasIndex() { return ((bitField0_ & 0x00000001) == 0x00000001); } public int getIndex() { return index_; } public Builder setIndex(int value) { bitField0_ |= 0x00000001; index_ = value; onChanged(); return this; } 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; public boolean hasKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } public com.google.protobuf.ByteString getKey() { return key_; } public Builder setKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; key_ = value; onChanged(); return this; } 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; boolean hasIndex(); int getIndex(); // optional bytes cipherKey = 2; boolean hasCipherKey(); com.google.protobuf.ByteString getCipherKey(); // optional bytes macKey = 3; boolean hasMacKey(); com.google.protobuf.ByteString getMacKey(); } public static final class MessageKey extends com.google.protobuf.GeneratedMessage implements MessageKeyOrBuilder { // Use MessageKey.newBuilder() to construct. private MessageKey(Builder builder) { super(builder); } private MessageKey(boolean noInit) {} private static final MessageKey defaultInstance; public static MessageKey getDefaultInstance() { return defaultInstance; } public MessageKey getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_Chain_MessageKey_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_Chain_MessageKey_fieldAccessorTable; } private int bitField0_; // optional uint32 index = 1; public static final int INDEX_FIELD_NUMBER = 1; private int index_; public boolean hasIndex() { return ((bitField0_ & 0x00000001) == 0x00000001); } public int getIndex() { return index_; } // optional bytes cipherKey = 2; public static final int CIPHERKEY_FIELD_NUMBER = 2; private com.google.protobuf.ByteString cipherKey_; public boolean hasCipherKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } 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_; public boolean hasMacKey() { return ((bitField0_ & 0x00000004) == 0x00000004); } public com.google.protobuf.ByteString getMacKey() { return macKey_; } private void initFields() { index_ = 0; cipherKey_ = com.google.protobuf.ByteString.EMPTY; macKey_ = 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_); } 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_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { return builder.buildParsed(); } else { return null; } } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input, extensionRegistry)) { return builder.buildParsed(); } else { return null; } } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKeyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_Chain_MessageKey_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_Chain_MessageKey_fieldAccessorTable; } // Construct using org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); index_ = 0; bitField0_ = (bitField0_ & ~0x00000001); cipherKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); macKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.getDescriptor(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey getDefaultInstanceForType() { return org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.getDefaultInstance(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey build() { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } private org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } return result; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey buildPartial() { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey result = new org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.index_ = index_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.cipherKey_ = cipherKey_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.macKey_ = macKey_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey) { return mergeFrom((org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey other) { if (other == org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.getDefaultInstance()) return this; if (other.hasIndex()) { setIndex(other.getIndex()); } if (other.hasCipherKey()) { setCipherKey(other.getCipherKey()); } if (other.hasMacKey()) { setMacKey(other.getMacKey()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder( this.getUnknownFields()); while (true) { int tag = input.readTag(); switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); onChanged(); return this; } break; } case 8: { bitField0_ |= 0x00000001; index_ = input.readUInt32(); break; } case 18: { bitField0_ |= 0x00000002; cipherKey_ = input.readBytes(); break; } case 26: { bitField0_ |= 0x00000004; macKey_ = input.readBytes(); break; } } } } private int bitField0_; // optional uint32 index = 1; private int index_ ; public boolean hasIndex() { return ((bitField0_ & 0x00000001) == 0x00000001); } public int getIndex() { return index_; } public Builder setIndex(int value) { bitField0_ |= 0x00000001; index_ = value; onChanged(); return this; } 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; public boolean hasCipherKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } public com.google.protobuf.ByteString getCipherKey() { return cipherKey_; } public Builder setCipherKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; cipherKey_ = value; onChanged(); return this; } 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; public boolean hasMacKey() { return ((bitField0_ & 0x00000004) == 0x00000004); } public com.google.protobuf.ByteString getMacKey() { return macKey_; } public Builder setMacKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; macKey_ = value; onChanged(); return this; } public Builder clearMacKey() { bitField0_ = (bitField0_ & ~0x00000004); macKey_ = getDefaultInstance().getMacKey(); 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 senderEphemeral = 1; public static final int SENDEREPHEMERAL_FIELD_NUMBER = 1; private com.google.protobuf.ByteString senderEphemeral_; public boolean hasSenderEphemeral() { return ((bitField0_ & 0x00000001) == 0x00000001); } public com.google.protobuf.ByteString getSenderEphemeral() { return senderEphemeral_; } // optional bytes senderEphemeralPrivate = 2; public static final int SENDEREPHEMERALPRIVATE_FIELD_NUMBER = 2; private com.google.protobuf.ByteString senderEphemeralPrivate_; public boolean hasSenderEphemeralPrivate() { return ((bitField0_ & 0x00000002) == 0x00000002); } public com.google.protobuf.ByteString getSenderEphemeralPrivate() { return senderEphemeralPrivate_; } // optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3; public static final int CHAINKEY_FIELD_NUMBER = 3; private org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey chainKey_; public boolean hasChainKey() { return ((bitField0_ & 0x00000004) == 0x00000004); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey getChainKey() { return chainKey_; } public org.whispersystems.textsecure.storage.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.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey> messageKeys_; public java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey> getMessageKeysList() { return messageKeys_; } public java.util.List<? extends org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKeyOrBuilder> getMessageKeysOrBuilderList() { return messageKeys_; } public int getMessageKeysCount() { return messageKeys_.size(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey getMessageKeys(int index) { return messageKeys_.get(index); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKeyOrBuilder getMessageKeysOrBuilder( int index) { return messageKeys_.get(index); } private void initFields() { senderEphemeral_ = com.google.protobuf.ByteString.EMPTY; senderEphemeralPrivate_ = com.google.protobuf.ByteString.EMPTY; chainKey_ = org.whispersystems.textsecure.storage.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, senderEphemeral_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, senderEphemeralPrivate_); } 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, senderEphemeral_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, senderEphemeralPrivate_); } 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; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { return builder.buildParsed(); } else { return null; } } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input, extensionRegistry)) { return builder.buildParsed(); } else { return null; } } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.ChainOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_Chain_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_Chain_fieldAccessorTable; } // Construct using org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getChainKeyFieldBuilder(); getMessageKeysFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); senderEphemeral_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); senderEphemeralPrivate_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); if (chainKeyBuilder_ == null) { chainKey_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.getDefaultInstance(); } else { chainKeyBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); if (messageKeysBuilder_ == null) { messageKeys_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); } else { messageKeysBuilder_.clear(); } return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.getDescriptor(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain getDefaultInstanceForType() { return org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.getDefaultInstance(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain build() { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } private org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } return result; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain buildPartial() { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain result = new org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.senderEphemeral_ = senderEphemeral_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.senderEphemeralPrivate_ = senderEphemeralPrivate_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } if (chainKeyBuilder_ == null) { result.chainKey_ = chainKey_; } else { result.chainKey_ = chainKeyBuilder_.build(); } if (messageKeysBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008)) { messageKeys_ = java.util.Collections.unmodifiableList(messageKeys_); bitField0_ = (bitField0_ & ~0x00000008); } result.messageKeys_ = messageKeys_; } else { result.messageKeys_ = messageKeysBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain) { return mergeFrom((org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain other) { if (other == org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.getDefaultInstance()) return this; if (other.hasSenderEphemeral()) { setSenderEphemeral(other.getSenderEphemeral()); } if (other.hasSenderEphemeralPrivate()) { setSenderEphemeralPrivate(other.getSenderEphemeralPrivate()); } if (other.hasChainKey()) { mergeChainKey(other.getChainKey()); } if (messageKeysBuilder_ == null) { if (!other.messageKeys_.isEmpty()) { if (messageKeys_.isEmpty()) { messageKeys_ = other.messageKeys_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureMessageKeysIsMutable(); messageKeys_.addAll(other.messageKeys_); } onChanged(); } } else { if (!other.messageKeys_.isEmpty()) { if (messageKeysBuilder_.isEmpty()) { messageKeysBuilder_.dispose(); messageKeysBuilder_ = null; messageKeys_ = other.messageKeys_; bitField0_ = (bitField0_ & ~0x00000008); messageKeysBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getMessageKeysFieldBuilder() : null; } else { messageKeysBuilder_.addAllMessages(other.messageKeys_); } } } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder( this.getUnknownFields()); while (true) { int tag = input.readTag(); switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); onChanged(); return this; } break; } case 10: { bitField0_ |= 0x00000001; senderEphemeral_ = input.readBytes(); break; } case 18: { bitField0_ |= 0x00000002; senderEphemeralPrivate_ = input.readBytes(); break; } case 26: { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.Builder subBuilder = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.newBuilder(); if (hasChainKey()) { subBuilder.mergeFrom(getChainKey()); } input.readMessage(subBuilder, extensionRegistry); setChainKey(subBuilder.buildPartial()); break; } case 34: { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.Builder subBuilder = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.newBuilder(); input.readMessage(subBuilder, extensionRegistry); addMessageKeys(subBuilder.buildPartial()); break; } } } } private int bitField0_; // optional bytes senderEphemeral = 1; private com.google.protobuf.ByteString senderEphemeral_ = com.google.protobuf.ByteString.EMPTY; public boolean hasSenderEphemeral() { return ((bitField0_ & 0x00000001) == 0x00000001); } public com.google.protobuf.ByteString getSenderEphemeral() { return senderEphemeral_; } public Builder setSenderEphemeral(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; senderEphemeral_ = value; onChanged(); return this; } public Builder clearSenderEphemeral() { bitField0_ = (bitField0_ & ~0x00000001); senderEphemeral_ = getDefaultInstance().getSenderEphemeral(); onChanged(); return this; } // optional bytes senderEphemeralPrivate = 2; private com.google.protobuf.ByteString senderEphemeralPrivate_ = com.google.protobuf.ByteString.EMPTY; public boolean hasSenderEphemeralPrivate() { return ((bitField0_ & 0x00000002) == 0x00000002); } public com.google.protobuf.ByteString getSenderEphemeralPrivate() { return senderEphemeralPrivate_; } public Builder setSenderEphemeralPrivate(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; senderEphemeralPrivate_ = value; onChanged(); return this; } public Builder clearSenderEphemeralPrivate() { bitField0_ = (bitField0_ & ~0x00000002); senderEphemeralPrivate_ = getDefaultInstance().getSenderEphemeralPrivate(); onChanged(); return this; } // optional .textsecure.SessionStructure.Chain.ChainKey chainKey = 3; private org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey chainKey_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKeyOrBuilder> chainKeyBuilder_; public boolean hasChainKey() { return ((bitField0_ & 0x00000004) == 0x00000004); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey getChainKey() { if (chainKeyBuilder_ == null) { return chainKey_; } else { return chainKeyBuilder_.getMessage(); } } public Builder setChainKey(org.whispersystems.textsecure.storage.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; } public Builder setChainKey( org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.Builder builderForValue) { if (chainKeyBuilder_ == null) { chainKey_ = builderForValue.build(); onChanged(); } else { chainKeyBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } public Builder mergeChainKey(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey value) { if (chainKeyBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && chainKey_ != org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.getDefaultInstance()) { chainKey_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.newBuilder(chainKey_).mergeFrom(value).buildPartial(); } else { chainKey_ = value; } onChanged(); } else { chainKeyBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } public Builder clearChainKey() { if (chainKeyBuilder_ == null) { chainKey_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.getDefaultInstance(); onChanged(); } else { chainKeyBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.Builder getChainKeyBuilder() { bitField0_ |= 0x00000004; onChanged(); return getChainKeyFieldBuilder().getBuilder(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKeyOrBuilder getChainKeyOrBuilder() { if (chainKeyBuilder_ != null) { return chainKeyBuilder_.getMessageOrBuilder(); } else { return chainKey_; } } private com.google.protobuf.SingleFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKeyOrBuilder> getChainKeyFieldBuilder() { if (chainKeyBuilder_ == null) { chainKeyBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKeyOrBuilder>( chainKey_, getParentForChildren(), isClean()); chainKey_ = null; } return chainKeyBuilder_; } // repeated .textsecure.SessionStructure.Chain.MessageKey messageKeys = 4; private java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey> messageKeys_ = java.util.Collections.emptyList(); private void ensureMessageKeysIsMutable() { if (!((bitField0_ & 0x00000008) == 0x00000008)) { messageKeys_ = new java.util.ArrayList<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey>(messageKeys_); bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKeyOrBuilder> messageKeysBuilder_; public java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey> getMessageKeysList() { if (messageKeysBuilder_ == null) { return java.util.Collections.unmodifiableList(messageKeys_); } else { return messageKeysBuilder_.getMessageList(); } } public int getMessageKeysCount() { if (messageKeysBuilder_ == null) { return messageKeys_.size(); } else { return messageKeysBuilder_.getCount(); } } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey getMessageKeys(int index) { if (messageKeysBuilder_ == null) { return messageKeys_.get(index); } else { return messageKeysBuilder_.getMessage(index); } } public Builder setMessageKeys( int index, org.whispersystems.textsecure.storage.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; } public Builder setMessageKeys( int index, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.Builder builderForValue) { if (messageKeysBuilder_ == null) { ensureMessageKeysIsMutable(); messageKeys_.set(index, builderForValue.build()); onChanged(); } else { messageKeysBuilder_.setMessage(index, builderForValue.build()); } return this; } public Builder addMessageKeys(org.whispersystems.textsecure.storage.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; } public Builder addMessageKeys( int index, org.whispersystems.textsecure.storage.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; } public Builder addMessageKeys( org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.Builder builderForValue) { if (messageKeysBuilder_ == null) { ensureMessageKeysIsMutable(); messageKeys_.add(builderForValue.build()); onChanged(); } else { messageKeysBuilder_.addMessage(builderForValue.build()); } return this; } public Builder addMessageKeys( int index, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.Builder builderForValue) { if (messageKeysBuilder_ == null) { ensureMessageKeysIsMutable(); messageKeys_.add(index, builderForValue.build()); onChanged(); } else { messageKeysBuilder_.addMessage(index, builderForValue.build()); } return this; } public Builder addAllMessageKeys( java.lang.Iterable<? extends org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey> values) { if (messageKeysBuilder_ == null) { ensureMessageKeysIsMutable(); super.addAll(values, messageKeys_); onChanged(); } else { messageKeysBuilder_.addAllMessages(values); } return this; } public Builder clearMessageKeys() { if (messageKeysBuilder_ == null) { messageKeys_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { messageKeysBuilder_.clear(); } return this; } public Builder removeMessageKeys(int index) { if (messageKeysBuilder_ == null) { ensureMessageKeysIsMutable(); messageKeys_.remove(index); onChanged(); } else { messageKeysBuilder_.remove(index); } return this; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.Builder getMessageKeysBuilder( int index) { return getMessageKeysFieldBuilder().getBuilder(index); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKeyOrBuilder getMessageKeysOrBuilder( int index) { if (messageKeysBuilder_ == null) { return messageKeys_.get(index); } else { return messageKeysBuilder_.getMessageOrBuilder(index); } } public java.util.List<? extends org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKeyOrBuilder> getMessageKeysOrBuilderList() { if (messageKeysBuilder_ != null) { return messageKeysBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(messageKeys_); } } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.Builder addMessageKeysBuilder() { return getMessageKeysFieldBuilder().addBuilder( org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.getDefaultInstance()); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.Builder addMessageKeysBuilder( int index) { return getMessageKeysFieldBuilder().addBuilder( index, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.getDefaultInstance()); } public java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.Builder> getMessageKeysBuilderList() { return getMessageKeysFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKeyOrBuilder> getMessageKeysFieldBuilder() { if (messageKeysBuilder_ == null) { messageKeysBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKeyOrBuilder>( messageKeys_, ((bitField0_ & 0x00000008) == 0x00000008), getParentForChildren(), isClean()); messageKeys_ = null; } return messageKeysBuilder_; } // @@protoc_insertion_point(builder_scope:textsecure.SessionStructure.Chain) } static { defaultInstance = new Chain(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:textsecure.SessionStructure.Chain) } public interface PendingKeyExchangeOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional uint32 sequence = 1; boolean hasSequence(); int getSequence(); // optional bytes localBaseKey = 2; boolean hasLocalBaseKey(); com.google.protobuf.ByteString getLocalBaseKey(); // optional bytes localBaseKeyPrivate = 3; boolean hasLocalBaseKeyPrivate(); com.google.protobuf.ByteString getLocalBaseKeyPrivate(); // optional bytes localEphemeralKey = 4; boolean hasLocalEphemeralKey(); com.google.protobuf.ByteString getLocalEphemeralKey(); // optional bytes localEphemeralKeyPrivate = 5; boolean hasLocalEphemeralKeyPrivate(); com.google.protobuf.ByteString getLocalEphemeralKeyPrivate(); // optional bytes localIdentityKey = 7; boolean hasLocalIdentityKey(); com.google.protobuf.ByteString getLocalIdentityKey(); // optional bytes localIdentityKeyPrivate = 8; boolean hasLocalIdentityKeyPrivate(); com.google.protobuf.ByteString getLocalIdentityKeyPrivate(); } public static final class PendingKeyExchange extends com.google.protobuf.GeneratedMessage implements PendingKeyExchangeOrBuilder { // Use PendingKeyExchange.newBuilder() to construct. private PendingKeyExchange(Builder builder) { super(builder); } private PendingKeyExchange(boolean noInit) {} private static final PendingKeyExchange defaultInstance; public static PendingKeyExchange getDefaultInstance() { return defaultInstance; } public PendingKeyExchange getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_PendingKeyExchange_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_PendingKeyExchange_fieldAccessorTable; } private int bitField0_; // optional uint32 sequence = 1; public static final int SEQUENCE_FIELD_NUMBER = 1; private int sequence_; public boolean hasSequence() { return ((bitField0_ & 0x00000001) == 0x00000001); } public int getSequence() { return sequence_; } // optional bytes localBaseKey = 2; public static final int LOCALBASEKEY_FIELD_NUMBER = 2; private com.google.protobuf.ByteString localBaseKey_; public boolean hasLocalBaseKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } 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_; public boolean hasLocalBaseKeyPrivate() { return ((bitField0_ & 0x00000004) == 0x00000004); } public com.google.protobuf.ByteString getLocalBaseKeyPrivate() { return localBaseKeyPrivate_; } // optional bytes localEphemeralKey = 4; public static final int LOCALEPHEMERALKEY_FIELD_NUMBER = 4; private com.google.protobuf.ByteString localEphemeralKey_; public boolean hasLocalEphemeralKey() { return ((bitField0_ & 0x00000008) == 0x00000008); } public com.google.protobuf.ByteString getLocalEphemeralKey() { return localEphemeralKey_; } // optional bytes localEphemeralKeyPrivate = 5; public static final int LOCALEPHEMERALKEYPRIVATE_FIELD_NUMBER = 5; private com.google.protobuf.ByteString localEphemeralKeyPrivate_; public boolean hasLocalEphemeralKeyPrivate() { return ((bitField0_ & 0x00000010) == 0x00000010); } public com.google.protobuf.ByteString getLocalEphemeralKeyPrivate() { return localEphemeralKeyPrivate_; } // optional bytes localIdentityKey = 7; public static final int LOCALIDENTITYKEY_FIELD_NUMBER = 7; private com.google.protobuf.ByteString localIdentityKey_; public boolean hasLocalIdentityKey() { return ((bitField0_ & 0x00000020) == 0x00000020); } 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_; public boolean hasLocalIdentityKeyPrivate() { return ((bitField0_ & 0x00000040) == 0x00000040); } 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; localEphemeralKey_ = com.google.protobuf.ByteString.EMPTY; localEphemeralKeyPrivate_ = 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, localEphemeralKey_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(5, localEphemeralKeyPrivate_); } 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, localEphemeralKey_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, localEphemeralKeyPrivate_); } 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; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { return builder.buildParsed(); } else { return null; } } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input, extensionRegistry)) { return builder.buildParsed(); } else { return null; } } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchangeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_PendingKeyExchange_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_PendingKeyExchange_fieldAccessorTable; } // Construct using org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); sequence_ = 0; bitField0_ = (bitField0_ & ~0x00000001); localBaseKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); localBaseKeyPrivate_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); localEphemeralKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); localEphemeralKeyPrivate_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); localIdentityKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000020); localIdentityKeyPrivate_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000040); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.getDescriptor(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange getDefaultInstanceForType() { return org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.getDefaultInstance(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange build() { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } private org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } return result; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange buildPartial() { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange result = new org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.sequence_ = sequence_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.localBaseKey_ = localBaseKey_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.localBaseKeyPrivate_ = localBaseKeyPrivate_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.localEphemeralKey_ = localEphemeralKey_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.localEphemeralKeyPrivate_ = localEphemeralKeyPrivate_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000020; } result.localIdentityKey_ = localIdentityKey_; if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000040; } result.localIdentityKeyPrivate_ = localIdentityKeyPrivate_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange) { return mergeFrom((org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange other) { if (other == org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.getDefaultInstance()) return this; if (other.hasSequence()) { setSequence(other.getSequence()); } if (other.hasLocalBaseKey()) { setLocalBaseKey(other.getLocalBaseKey()); } if (other.hasLocalBaseKeyPrivate()) { setLocalBaseKeyPrivate(other.getLocalBaseKeyPrivate()); } if (other.hasLocalEphemeralKey()) { setLocalEphemeralKey(other.getLocalEphemeralKey()); } if (other.hasLocalEphemeralKeyPrivate()) { setLocalEphemeralKeyPrivate(other.getLocalEphemeralKeyPrivate()); } if (other.hasLocalIdentityKey()) { setLocalIdentityKey(other.getLocalIdentityKey()); } if (other.hasLocalIdentityKeyPrivate()) { setLocalIdentityKeyPrivate(other.getLocalIdentityKeyPrivate()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder( this.getUnknownFields()); while (true) { int tag = input.readTag(); switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); onChanged(); return this; } break; } case 8: { bitField0_ |= 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; localEphemeralKey_ = input.readBytes(); break; } case 42: { bitField0_ |= 0x00000010; localEphemeralKeyPrivate_ = input.readBytes(); break; } case 58: { bitField0_ |= 0x00000020; localIdentityKey_ = input.readBytes(); break; } case 66: { bitField0_ |= 0x00000040; localIdentityKeyPrivate_ = input.readBytes(); break; } } } } private int bitField0_; // optional uint32 sequence = 1; private int sequence_ ; public boolean hasSequence() { return ((bitField0_ & 0x00000001) == 0x00000001); } public int getSequence() { return sequence_; } public Builder setSequence(int value) { bitField0_ |= 0x00000001; sequence_ = value; onChanged(); return this; } 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; public boolean hasLocalBaseKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } public com.google.protobuf.ByteString getLocalBaseKey() { return localBaseKey_; } public Builder setLocalBaseKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; localBaseKey_ = value; onChanged(); return this; } 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; public boolean hasLocalBaseKeyPrivate() { return ((bitField0_ & 0x00000004) == 0x00000004); } public com.google.protobuf.ByteString getLocalBaseKeyPrivate() { return localBaseKeyPrivate_; } public Builder setLocalBaseKeyPrivate(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; localBaseKeyPrivate_ = value; onChanged(); return this; } public Builder clearLocalBaseKeyPrivate() { bitField0_ = (bitField0_ & ~0x00000004); localBaseKeyPrivate_ = getDefaultInstance().getLocalBaseKeyPrivate(); onChanged(); return this; } // optional bytes localEphemeralKey = 4; private com.google.protobuf.ByteString localEphemeralKey_ = com.google.protobuf.ByteString.EMPTY; public boolean hasLocalEphemeralKey() { return ((bitField0_ & 0x00000008) == 0x00000008); } public com.google.protobuf.ByteString getLocalEphemeralKey() { return localEphemeralKey_; } public Builder setLocalEphemeralKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; localEphemeralKey_ = value; onChanged(); return this; } public Builder clearLocalEphemeralKey() { bitField0_ = (bitField0_ & ~0x00000008); localEphemeralKey_ = getDefaultInstance().getLocalEphemeralKey(); onChanged(); return this; } // optional bytes localEphemeralKeyPrivate = 5; private com.google.protobuf.ByteString localEphemeralKeyPrivate_ = com.google.protobuf.ByteString.EMPTY; public boolean hasLocalEphemeralKeyPrivate() { return ((bitField0_ & 0x00000010) == 0x00000010); } public com.google.protobuf.ByteString getLocalEphemeralKeyPrivate() { return localEphemeralKeyPrivate_; } public Builder setLocalEphemeralKeyPrivate(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; localEphemeralKeyPrivate_ = value; onChanged(); return this; } public Builder clearLocalEphemeralKeyPrivate() { bitField0_ = (bitField0_ & ~0x00000010); localEphemeralKeyPrivate_ = getDefaultInstance().getLocalEphemeralKeyPrivate(); onChanged(); return this; } // optional bytes localIdentityKey = 7; private com.google.protobuf.ByteString localIdentityKey_ = com.google.protobuf.ByteString.EMPTY; public boolean hasLocalIdentityKey() { return ((bitField0_ & 0x00000020) == 0x00000020); } public com.google.protobuf.ByteString getLocalIdentityKey() { return localIdentityKey_; } public Builder setLocalIdentityKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; localIdentityKey_ = value; onChanged(); return this; } 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; public boolean hasLocalIdentityKeyPrivate() { return ((bitField0_ & 0x00000040) == 0x00000040); } public com.google.protobuf.ByteString getLocalIdentityKeyPrivate() { return localIdentityKeyPrivate_; } public Builder setLocalIdentityKeyPrivate(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000040; localIdentityKeyPrivate_ = value; onChanged(); return this; } 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; boolean hasPreKeyId(); int getPreKeyId(); // optional bytes baseKey = 2; boolean hasBaseKey(); com.google.protobuf.ByteString getBaseKey(); } public static final class PendingPreKey extends com.google.protobuf.GeneratedMessage implements PendingPreKeyOrBuilder { // Use PendingPreKey.newBuilder() to construct. private PendingPreKey(Builder builder) { super(builder); } private PendingPreKey(boolean noInit) {} private static final PendingPreKey defaultInstance; public static PendingPreKey getDefaultInstance() { return defaultInstance; } public PendingPreKey getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_PendingPreKey_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_PendingPreKey_fieldAccessorTable; } private int bitField0_; // optional uint32 preKeyId = 1; public static final int PREKEYID_FIELD_NUMBER = 1; private int preKeyId_; public boolean hasPreKeyId() { return ((bitField0_ & 0x00000001) == 0x00000001); } public int getPreKeyId() { return preKeyId_; } // optional bytes baseKey = 2; public static final int BASEKEY_FIELD_NUMBER = 2; private com.google.protobuf.ByteString baseKey_; public boolean hasBaseKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } public com.google.protobuf.ByteString getBaseKey() { return baseKey_; } private void initFields() { preKeyId_ = 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_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, baseKey_); } 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_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, baseKey_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { return builder.buildParsed(); } else { return null; } } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input, extensionRegistry)) { return builder.buildParsed(); } else { return null; } } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKeyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_PendingPreKey_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_PendingPreKey_fieldAccessorTable; } // Construct using org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); preKeyId_ = 0; bitField0_ = (bitField0_ & ~0x00000001); baseKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.getDescriptor(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey getDefaultInstanceForType() { return org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.getDefaultInstance(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey build() { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } private org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } return result; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey buildPartial() { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey result = new org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.preKeyId_ = preKeyId_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.baseKey_ = baseKey_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey) { return mergeFrom((org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey other) { if (other == org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.getDefaultInstance()) return this; if (other.hasPreKeyId()) { setPreKeyId(other.getPreKeyId()); } if (other.hasBaseKey()) { setBaseKey(other.getBaseKey()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder( this.getUnknownFields()); while (true) { int tag = input.readTag(); switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); onChanged(); return this; } break; } case 8: { bitField0_ |= 0x00000001; preKeyId_ = input.readUInt32(); break; } case 18: { bitField0_ |= 0x00000002; baseKey_ = input.readBytes(); break; } } } } private int bitField0_; // optional uint32 preKeyId = 1; private int preKeyId_ ; public boolean hasPreKeyId() { return ((bitField0_ & 0x00000001) == 0x00000001); } public int getPreKeyId() { return preKeyId_; } public Builder setPreKeyId(int value) { bitField0_ |= 0x00000001; preKeyId_ = value; onChanged(); return this; } public Builder clearPreKeyId() { bitField0_ = (bitField0_ & ~0x00000001); preKeyId_ = 0; onChanged(); return this; } // optional bytes baseKey = 2; private com.google.protobuf.ByteString baseKey_ = com.google.protobuf.ByteString.EMPTY; public boolean hasBaseKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } public com.google.protobuf.ByteString getBaseKey() { return baseKey_; } public Builder setBaseKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; baseKey_ = value; onChanged(); return this; } public Builder clearBaseKey() { bitField0_ = (bitField0_ & ~0x00000002); 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_; public boolean hasSessionVersion() { return ((bitField0_ & 0x00000001) == 0x00000001); } public int getSessionVersion() { return sessionVersion_; } // optional bytes localIdentityPublic = 2; public static final int LOCALIDENTITYPUBLIC_FIELD_NUMBER = 2; private com.google.protobuf.ByteString localIdentityPublic_; public boolean hasLocalIdentityPublic() { return ((bitField0_ & 0x00000002) == 0x00000002); } 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_; public boolean hasRemoteIdentityPublic() { return ((bitField0_ & 0x00000004) == 0x00000004); } 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_; public boolean hasRootKey() { return ((bitField0_ & 0x00000008) == 0x00000008); } public com.google.protobuf.ByteString getRootKey() { return rootKey_; } // optional uint32 previousCounter = 5; public static final int PREVIOUSCOUNTER_FIELD_NUMBER = 5; private int previousCounter_; public boolean hasPreviousCounter() { return ((bitField0_ & 0x00000010) == 0x00000010); } public int getPreviousCounter() { return previousCounter_; } // optional .textsecure.SessionStructure.Chain senderChain = 6; public static final int SENDERCHAIN_FIELD_NUMBER = 6; private org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain senderChain_; public boolean hasSenderChain() { return ((bitField0_ & 0x00000020) == 0x00000020); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain getSenderChain() { return senderChain_; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.ChainOrBuilder getSenderChainOrBuilder() { return senderChain_; } // repeated .textsecure.SessionStructure.Chain receiverChains = 7; public static final int RECEIVERCHAINS_FIELD_NUMBER = 7; private java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain> receiverChains_; public java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain> getReceiverChainsList() { return receiverChains_; } public java.util.List<? extends org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.ChainOrBuilder> getReceiverChainsOrBuilderList() { return receiverChains_; } public int getReceiverChainsCount() { return receiverChains_.size(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain getReceiverChains(int index) { return receiverChains_.get(index); } public org.whispersystems.textsecure.storage.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.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange pendingKeyExchange_; public boolean hasPendingKeyExchange() { return ((bitField0_ & 0x00000040) == 0x00000040); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange getPendingKeyExchange() { return pendingKeyExchange_; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchangeOrBuilder getPendingKeyExchangeOrBuilder() { return pendingKeyExchange_; } // optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9; public static final int PENDINGPREKEY_FIELD_NUMBER = 9; private org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey pendingPreKey_; public boolean hasPendingPreKey() { return ((bitField0_ & 0x00000080) == 0x00000080); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey getPendingPreKey() { return pendingPreKey_; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKeyOrBuilder getPendingPreKeyOrBuilder() { return pendingPreKey_; } // optional uint32 remoteRegistrationId = 10; public static final int REMOTEREGISTRATIONID_FIELD_NUMBER = 10; private int remoteRegistrationId_; public boolean hasRemoteRegistrationId() { return ((bitField0_ & 0x00000100) == 0x00000100); } public int getRemoteRegistrationId() { return remoteRegistrationId_; } // optional uint32 localRegistrationId = 11; public static final int LOCALREGISTRATIONID_FIELD_NUMBER = 11; private int localRegistrationId_; public boolean hasLocalRegistrationId() { return ((bitField0_ & 0x00000200) == 0x00000200); } public int getLocalRegistrationId() { return localRegistrationId_; } // optional bool needsRefresh = 12; public static final int NEEDSREFRESH_FIELD_NUMBER = 12; private boolean needsRefresh_; public boolean hasNeedsRefresh() { return ((bitField0_ & 0x00000400) == 0x00000400); } public boolean getNeedsRefresh() { return needsRefresh_; } 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.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.getDefaultInstance(); receiverChains_ = java.util.Collections.emptyList(); pendingKeyExchange_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.getDefaultInstance(); pendingPreKey_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.getDefaultInstance(); remoteRegistrationId_ = 0; localRegistrationId_ = 0; needsRefresh_ = false; } 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_); } 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_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { return builder.buildParsed(); } else { return null; } } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input, extensionRegistry)) { return builder.buildParsed(); } else { return null; } } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.SessionStructure parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements org.whispersystems.textsecure.storage.StorageProtos.SessionStructureOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_SessionStructure_fieldAccessorTable; } // Construct using org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getSenderChainFieldBuilder(); getReceiverChainsFieldBuilder(); getPendingKeyExchangeFieldBuilder(); getPendingPreKeyFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); sessionVersion_ = 0; bitField0_ = (bitField0_ & ~0x00000001); localIdentityPublic_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); remoteIdentityPublic_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); rootKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); previousCounter_ = 0; bitField0_ = (bitField0_ & ~0x00000010); if (senderChainBuilder_ == null) { senderChain_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.getDefaultInstance(); } else { senderChainBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000020); if (receiverChainsBuilder_ == null) { receiverChains_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000040); } else { receiverChainsBuilder_.clear(); } if (pendingKeyExchangeBuilder_ == null) { pendingKeyExchange_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.getDefaultInstance(); } else { pendingKeyExchangeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000080); if (pendingPreKeyBuilder_ == null) { pendingPreKey_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.getDefaultInstance(); } else { pendingPreKeyBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000100); remoteRegistrationId_ = 0; bitField0_ = (bitField0_ & ~0x00000200); localRegistrationId_ = 0; bitField0_ = (bitField0_ & ~0x00000400); needsRefresh_ = false; bitField0_ = (bitField0_ & ~0x00000800); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.getDescriptor(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure getDefaultInstanceForType() { return org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.getDefaultInstance(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure build() { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } private org.whispersystems.textsecure.storage.StorageProtos.SessionStructure buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } return result; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure buildPartial() { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure result = new org.whispersystems.textsecure.storage.StorageProtos.SessionStructure(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.sessionVersion_ = sessionVersion_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.localIdentityPublic_ = localIdentityPublic_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.remoteIdentityPublic_ = remoteIdentityPublic_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.rootKey_ = rootKey_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.previousCounter_ = previousCounter_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000020; } if (senderChainBuilder_ == null) { result.senderChain_ = senderChain_; } else { result.senderChain_ = senderChainBuilder_.build(); } if (receiverChainsBuilder_ == null) { if (((bitField0_ & 0x00000040) == 0x00000040)) { receiverChains_ = java.util.Collections.unmodifiableList(receiverChains_); bitField0_ = (bitField0_ & ~0x00000040); } result.receiverChains_ = receiverChains_; } else { result.receiverChains_ = receiverChainsBuilder_.build(); } if (((from_bitField0_ & 0x00000080) == 0x00000080)) { to_bitField0_ |= 0x00000040; } if (pendingKeyExchangeBuilder_ == null) { result.pendingKeyExchange_ = pendingKeyExchange_; } else { result.pendingKeyExchange_ = pendingKeyExchangeBuilder_.build(); } if (((from_bitField0_ & 0x00000100) == 0x00000100)) { to_bitField0_ |= 0x00000080; } if (pendingPreKeyBuilder_ == null) { result.pendingPreKey_ = pendingPreKey_; } else { result.pendingPreKey_ = pendingPreKeyBuilder_.build(); } if (((from_bitField0_ & 0x00000200) == 0x00000200)) { to_bitField0_ |= 0x00000100; } result.remoteRegistrationId_ = remoteRegistrationId_; if (((from_bitField0_ & 0x00000400) == 0x00000400)) { to_bitField0_ |= 0x00000200; } result.localRegistrationId_ = localRegistrationId_; if (((from_bitField0_ & 0x00000800) == 0x00000800)) { to_bitField0_ |= 0x00000400; } result.needsRefresh_ = needsRefresh_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.whispersystems.textsecure.storage.StorageProtos.SessionStructure) { return mergeFrom((org.whispersystems.textsecure.storage.StorageProtos.SessionStructure)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure other) { if (other == org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.getDefaultInstance()) return this; if (other.hasSessionVersion()) { setSessionVersion(other.getSessionVersion()); } if (other.hasLocalIdentityPublic()) { setLocalIdentityPublic(other.getLocalIdentityPublic()); } if (other.hasRemoteIdentityPublic()) { setRemoteIdentityPublic(other.getRemoteIdentityPublic()); } if (other.hasRootKey()) { setRootKey(other.getRootKey()); } if (other.hasPreviousCounter()) { setPreviousCounter(other.getPreviousCounter()); } if (other.hasSenderChain()) { mergeSenderChain(other.getSenderChain()); } if (receiverChainsBuilder_ == null) { if (!other.receiverChains_.isEmpty()) { if (receiverChains_.isEmpty()) { receiverChains_ = other.receiverChains_; bitField0_ = (bitField0_ & ~0x00000040); } else { ensureReceiverChainsIsMutable(); receiverChains_.addAll(other.receiverChains_); } onChanged(); } } else { if (!other.receiverChains_.isEmpty()) { if (receiverChainsBuilder_.isEmpty()) { receiverChainsBuilder_.dispose(); receiverChainsBuilder_ = null; receiverChains_ = other.receiverChains_; bitField0_ = (bitField0_ & ~0x00000040); receiverChainsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getReceiverChainsFieldBuilder() : null; } else { receiverChainsBuilder_.addAllMessages(other.receiverChains_); } } } if (other.hasPendingKeyExchange()) { mergePendingKeyExchange(other.getPendingKeyExchange()); } if (other.hasPendingPreKey()) { mergePendingPreKey(other.getPendingPreKey()); } if (other.hasRemoteRegistrationId()) { setRemoteRegistrationId(other.getRemoteRegistrationId()); } if (other.hasLocalRegistrationId()) { setLocalRegistrationId(other.getLocalRegistrationId()); } if (other.hasNeedsRefresh()) { setNeedsRefresh(other.getNeedsRefresh()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder( this.getUnknownFields()); while (true) { int tag = input.readTag(); switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); onChanged(); return this; } break; } case 8: { bitField0_ |= 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.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder subBuilder = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.newBuilder(); if (hasSenderChain()) { subBuilder.mergeFrom(getSenderChain()); } input.readMessage(subBuilder, extensionRegistry); setSenderChain(subBuilder.buildPartial()); break; } case 58: { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder subBuilder = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.newBuilder(); input.readMessage(subBuilder, extensionRegistry); addReceiverChains(subBuilder.buildPartial()); break; } case 66: { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.Builder subBuilder = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.newBuilder(); if (hasPendingKeyExchange()) { subBuilder.mergeFrom(getPendingKeyExchange()); } input.readMessage(subBuilder, extensionRegistry); setPendingKeyExchange(subBuilder.buildPartial()); break; } case 74: { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.Builder subBuilder = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.newBuilder(); if (hasPendingPreKey()) { subBuilder.mergeFrom(getPendingPreKey()); } input.readMessage(subBuilder, extensionRegistry); setPendingPreKey(subBuilder.buildPartial()); break; } case 80: { bitField0_ |= 0x00000200; remoteRegistrationId_ = input.readUInt32(); break; } case 88: { bitField0_ |= 0x00000400; localRegistrationId_ = input.readUInt32(); break; } case 96: { bitField0_ |= 0x00000800; needsRefresh_ = input.readBool(); break; } } } } private int bitField0_; // optional uint32 sessionVersion = 1; private int sessionVersion_ ; public boolean hasSessionVersion() { return ((bitField0_ & 0x00000001) == 0x00000001); } public int getSessionVersion() { return sessionVersion_; } public Builder setSessionVersion(int value) { bitField0_ |= 0x00000001; sessionVersion_ = value; onChanged(); return this; } 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; public boolean hasLocalIdentityPublic() { return ((bitField0_ & 0x00000002) == 0x00000002); } public com.google.protobuf.ByteString getLocalIdentityPublic() { return localIdentityPublic_; } public Builder setLocalIdentityPublic(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; localIdentityPublic_ = value; onChanged(); return this; } 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; public boolean hasRemoteIdentityPublic() { return ((bitField0_ & 0x00000004) == 0x00000004); } public com.google.protobuf.ByteString getRemoteIdentityPublic() { return remoteIdentityPublic_; } public Builder setRemoteIdentityPublic(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; remoteIdentityPublic_ = value; onChanged(); return this; } 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; public boolean hasRootKey() { return ((bitField0_ & 0x00000008) == 0x00000008); } public com.google.protobuf.ByteString getRootKey() { return rootKey_; } public Builder setRootKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; rootKey_ = value; onChanged(); return this; } public Builder clearRootKey() { bitField0_ = (bitField0_ & ~0x00000008); rootKey_ = getDefaultInstance().getRootKey(); onChanged(); return this; } // optional uint32 previousCounter = 5; private int previousCounter_ ; public boolean hasPreviousCounter() { return ((bitField0_ & 0x00000010) == 0x00000010); } public int getPreviousCounter() { return previousCounter_; } public Builder setPreviousCounter(int value) { bitField0_ |= 0x00000010; previousCounter_ = value; onChanged(); return this; } public Builder clearPreviousCounter() { bitField0_ = (bitField0_ & ~0x00000010); previousCounter_ = 0; onChanged(); return this; } // optional .textsecure.SessionStructure.Chain senderChain = 6; private org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain senderChain_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.ChainOrBuilder> senderChainBuilder_; public boolean hasSenderChain() { return ((bitField0_ & 0x00000020) == 0x00000020); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain getSenderChain() { if (senderChainBuilder_ == null) { return senderChain_; } else { return senderChainBuilder_.getMessage(); } } public Builder setSenderChain(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain value) { if (senderChainBuilder_ == null) { if (value == null) { throw new NullPointerException(); } senderChain_ = value; onChanged(); } else { senderChainBuilder_.setMessage(value); } bitField0_ |= 0x00000020; return this; } public Builder setSenderChain( org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder builderForValue) { if (senderChainBuilder_ == null) { senderChain_ = builderForValue.build(); onChanged(); } else { senderChainBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000020; return this; } public Builder mergeSenderChain(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain value) { if (senderChainBuilder_ == null) { if (((bitField0_ & 0x00000020) == 0x00000020) && senderChain_ != org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.getDefaultInstance()) { senderChain_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.newBuilder(senderChain_).mergeFrom(value).buildPartial(); } else { senderChain_ = value; } onChanged(); } else { senderChainBuilder_.mergeFrom(value); } bitField0_ |= 0x00000020; return this; } public Builder clearSenderChain() { if (senderChainBuilder_ == null) { senderChain_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.getDefaultInstance(); onChanged(); } else { senderChainBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000020); return this; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder getSenderChainBuilder() { bitField0_ |= 0x00000020; onChanged(); return getSenderChainFieldBuilder().getBuilder(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.ChainOrBuilder getSenderChainOrBuilder() { if (senderChainBuilder_ != null) { return senderChainBuilder_.getMessageOrBuilder(); } else { return senderChain_; } } private com.google.protobuf.SingleFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.ChainOrBuilder> getSenderChainFieldBuilder() { if (senderChainBuilder_ == null) { senderChainBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.ChainOrBuilder>( senderChain_, getParentForChildren(), isClean()); senderChain_ = null; } return senderChainBuilder_; } // repeated .textsecure.SessionStructure.Chain receiverChains = 7; private java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain> receiverChains_ = java.util.Collections.emptyList(); private void ensureReceiverChainsIsMutable() { if (!((bitField0_ & 0x00000040) == 0x00000040)) { receiverChains_ = new java.util.ArrayList<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain>(receiverChains_); bitField0_ |= 0x00000040; } } private com.google.protobuf.RepeatedFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.ChainOrBuilder> receiverChainsBuilder_; public java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain> getReceiverChainsList() { if (receiverChainsBuilder_ == null) { return java.util.Collections.unmodifiableList(receiverChains_); } else { return receiverChainsBuilder_.getMessageList(); } } public int getReceiverChainsCount() { if (receiverChainsBuilder_ == null) { return receiverChains_.size(); } else { return receiverChainsBuilder_.getCount(); } } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain getReceiverChains(int index) { if (receiverChainsBuilder_ == null) { return receiverChains_.get(index); } else { return receiverChainsBuilder_.getMessage(index); } } public Builder setReceiverChains( int index, org.whispersystems.textsecure.storage.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; } public Builder setReceiverChains( int index, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder builderForValue) { if (receiverChainsBuilder_ == null) { ensureReceiverChainsIsMutable(); receiverChains_.set(index, builderForValue.build()); onChanged(); } else { receiverChainsBuilder_.setMessage(index, builderForValue.build()); } return this; } public Builder addReceiverChains(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain value) { if (receiverChainsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureReceiverChainsIsMutable(); receiverChains_.add(value); onChanged(); } else { receiverChainsBuilder_.addMessage(value); } return this; } public Builder addReceiverChains( int index, org.whispersystems.textsecure.storage.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; } public Builder addReceiverChains( org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder builderForValue) { if (receiverChainsBuilder_ == null) { ensureReceiverChainsIsMutable(); receiverChains_.add(builderForValue.build()); onChanged(); } else { receiverChainsBuilder_.addMessage(builderForValue.build()); } return this; } public Builder addReceiverChains( int index, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder builderForValue) { if (receiverChainsBuilder_ == null) { ensureReceiverChainsIsMutable(); receiverChains_.add(index, builderForValue.build()); onChanged(); } else { receiverChainsBuilder_.addMessage(index, builderForValue.build()); } return this; } public Builder addAllReceiverChains( java.lang.Iterable<? extends org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain> values) { if (receiverChainsBuilder_ == null) { ensureReceiverChainsIsMutable(); super.addAll(values, receiverChains_); onChanged(); } else { receiverChainsBuilder_.addAllMessages(values); } return this; } public Builder clearReceiverChains() { if (receiverChainsBuilder_ == null) { receiverChains_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000040); onChanged(); } else { receiverChainsBuilder_.clear(); } return this; } public Builder removeReceiverChains(int index) { if (receiverChainsBuilder_ == null) { ensureReceiverChainsIsMutable(); receiverChains_.remove(index); onChanged(); } else { receiverChainsBuilder_.remove(index); } return this; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder getReceiverChainsBuilder( int index) { return getReceiverChainsFieldBuilder().getBuilder(index); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.ChainOrBuilder getReceiverChainsOrBuilder( int index) { if (receiverChainsBuilder_ == null) { return receiverChains_.get(index); } else { return receiverChainsBuilder_.getMessageOrBuilder(index); } } public java.util.List<? extends org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.ChainOrBuilder> getReceiverChainsOrBuilderList() { if (receiverChainsBuilder_ != null) { return receiverChainsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(receiverChains_); } } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder addReceiverChainsBuilder() { return getReceiverChainsFieldBuilder().addBuilder( org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.getDefaultInstance()); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder addReceiverChainsBuilder( int index) { return getReceiverChainsFieldBuilder().addBuilder( index, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.getDefaultInstance()); } public java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder> getReceiverChainsBuilderList() { return getReceiverChainsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.ChainOrBuilder> getReceiverChainsFieldBuilder() { if (receiverChainsBuilder_ == null) { receiverChainsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.ChainOrBuilder>( receiverChains_, ((bitField0_ & 0x00000040) == 0x00000040), getParentForChildren(), isClean()); receiverChains_ = null; } return receiverChainsBuilder_; } // optional .textsecure.SessionStructure.PendingKeyExchange pendingKeyExchange = 8; private org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange pendingKeyExchange_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchangeOrBuilder> pendingKeyExchangeBuilder_; public boolean hasPendingKeyExchange() { return ((bitField0_ & 0x00000080) == 0x00000080); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange getPendingKeyExchange() { if (pendingKeyExchangeBuilder_ == null) { return pendingKeyExchange_; } else { return pendingKeyExchangeBuilder_.getMessage(); } } public Builder setPendingKeyExchange(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange value) { if (pendingKeyExchangeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } pendingKeyExchange_ = value; onChanged(); } else { pendingKeyExchangeBuilder_.setMessage(value); } bitField0_ |= 0x00000080; return this; } public Builder setPendingKeyExchange( org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.Builder builderForValue) { if (pendingKeyExchangeBuilder_ == null) { pendingKeyExchange_ = builderForValue.build(); onChanged(); } else { pendingKeyExchangeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000080; return this; } public Builder mergePendingKeyExchange(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange value) { if (pendingKeyExchangeBuilder_ == null) { if (((bitField0_ & 0x00000080) == 0x00000080) && pendingKeyExchange_ != org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.getDefaultInstance()) { pendingKeyExchange_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.newBuilder(pendingKeyExchange_).mergeFrom(value).buildPartial(); } else { pendingKeyExchange_ = value; } onChanged(); } else { pendingKeyExchangeBuilder_.mergeFrom(value); } bitField0_ |= 0x00000080; return this; } public Builder clearPendingKeyExchange() { if (pendingKeyExchangeBuilder_ == null) { pendingKeyExchange_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.getDefaultInstance(); onChanged(); } else { pendingKeyExchangeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000080); return this; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.Builder getPendingKeyExchangeBuilder() { bitField0_ |= 0x00000080; onChanged(); return getPendingKeyExchangeFieldBuilder().getBuilder(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchangeOrBuilder getPendingKeyExchangeOrBuilder() { if (pendingKeyExchangeBuilder_ != null) { return pendingKeyExchangeBuilder_.getMessageOrBuilder(); } else { return pendingKeyExchange_; } } private com.google.protobuf.SingleFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchangeOrBuilder> getPendingKeyExchangeFieldBuilder() { if (pendingKeyExchangeBuilder_ == null) { pendingKeyExchangeBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchangeOrBuilder>( pendingKeyExchange_, getParentForChildren(), isClean()); pendingKeyExchange_ = null; } return pendingKeyExchangeBuilder_; } // optional .textsecure.SessionStructure.PendingPreKey pendingPreKey = 9; private org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey pendingPreKey_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKeyOrBuilder> pendingPreKeyBuilder_; public boolean hasPendingPreKey() { return ((bitField0_ & 0x00000100) == 0x00000100); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey getPendingPreKey() { if (pendingPreKeyBuilder_ == null) { return pendingPreKey_; } else { return pendingPreKeyBuilder_.getMessage(); } } public Builder setPendingPreKey(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey value) { if (pendingPreKeyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } pendingPreKey_ = value; onChanged(); } else { pendingPreKeyBuilder_.setMessage(value); } bitField0_ |= 0x00000100; return this; } public Builder setPendingPreKey( org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.Builder builderForValue) { if (pendingPreKeyBuilder_ == null) { pendingPreKey_ = builderForValue.build(); onChanged(); } else { pendingPreKeyBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000100; return this; } public Builder mergePendingPreKey(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey value) { if (pendingPreKeyBuilder_ == null) { if (((bitField0_ & 0x00000100) == 0x00000100) && pendingPreKey_ != org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.getDefaultInstance()) { pendingPreKey_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.newBuilder(pendingPreKey_).mergeFrom(value).buildPartial(); } else { pendingPreKey_ = value; } onChanged(); } else { pendingPreKeyBuilder_.mergeFrom(value); } bitField0_ |= 0x00000100; return this; } public Builder clearPendingPreKey() { if (pendingPreKeyBuilder_ == null) { pendingPreKey_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.getDefaultInstance(); onChanged(); } else { pendingPreKeyBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000100); return this; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.Builder getPendingPreKeyBuilder() { bitField0_ |= 0x00000100; onChanged(); return getPendingPreKeyFieldBuilder().getBuilder(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKeyOrBuilder getPendingPreKeyOrBuilder() { if (pendingPreKeyBuilder_ != null) { return pendingPreKeyBuilder_.getMessageOrBuilder(); } else { return pendingPreKey_; } } private com.google.protobuf.SingleFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKeyOrBuilder> getPendingPreKeyFieldBuilder() { if (pendingPreKeyBuilder_ == null) { pendingPreKeyBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKeyOrBuilder>( pendingPreKey_, getParentForChildren(), isClean()); pendingPreKey_ = null; } return pendingPreKeyBuilder_; } // optional uint32 remoteRegistrationId = 10; private int remoteRegistrationId_ ; public boolean hasRemoteRegistrationId() { return ((bitField0_ & 0x00000200) == 0x00000200); } public int getRemoteRegistrationId() { return remoteRegistrationId_; } public Builder setRemoteRegistrationId(int value) { bitField0_ |= 0x00000200; remoteRegistrationId_ = value; onChanged(); return this; } public Builder clearRemoteRegistrationId() { bitField0_ = (bitField0_ & ~0x00000200); remoteRegistrationId_ = 0; onChanged(); return this; } // optional uint32 localRegistrationId = 11; private int localRegistrationId_ ; public boolean hasLocalRegistrationId() { return ((bitField0_ & 0x00000400) == 0x00000400); } public int getLocalRegistrationId() { return localRegistrationId_; } public Builder setLocalRegistrationId(int value) { bitField0_ |= 0x00000400; localRegistrationId_ = value; onChanged(); return this; } public Builder clearLocalRegistrationId() { bitField0_ = (bitField0_ & ~0x00000400); localRegistrationId_ = 0; onChanged(); return this; } // optional bool needsRefresh = 12; private boolean needsRefresh_ ; public boolean hasNeedsRefresh() { return ((bitField0_ & 0x00000800) == 0x00000800); } public boolean getNeedsRefresh() { return needsRefresh_; } public Builder setNeedsRefresh(boolean value) { bitField0_ |= 0x00000800; needsRefresh_ = value; onChanged(); return this; } public Builder clearNeedsRefresh() { bitField0_ = (bitField0_ & ~0x00000800); needsRefresh_ = false; 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; boolean hasCurrentSession(); org.whispersystems.textsecure.storage.StorageProtos.SessionStructure getCurrentSession(); org.whispersystems.textsecure.storage.StorageProtos.SessionStructureOrBuilder getCurrentSessionOrBuilder(); // repeated .textsecure.SessionStructure previousSessions = 2; java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure> getPreviousSessionsList(); org.whispersystems.textsecure.storage.StorageProtos.SessionStructure getPreviousSessions(int index); int getPreviousSessionsCount(); java.util.List<? extends org.whispersystems.textsecure.storage.StorageProtos.SessionStructureOrBuilder> getPreviousSessionsOrBuilderList(); org.whispersystems.textsecure.storage.StorageProtos.SessionStructureOrBuilder getPreviousSessionsOrBuilder( int index); } public static final class RecordStructure extends com.google.protobuf.GeneratedMessage implements RecordStructureOrBuilder { // Use RecordStructure.newBuilder() to construct. private RecordStructure(Builder builder) { super(builder); } private RecordStructure(boolean noInit) {} private static final RecordStructure defaultInstance; public static RecordStructure getDefaultInstance() { return defaultInstance; } public RecordStructure getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_RecordStructure_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_RecordStructure_fieldAccessorTable; } private int bitField0_; // optional .textsecure.SessionStructure currentSession = 1; public static final int CURRENTSESSION_FIELD_NUMBER = 1; private org.whispersystems.textsecure.storage.StorageProtos.SessionStructure currentSession_; public boolean hasCurrentSession() { return ((bitField0_ & 0x00000001) == 0x00000001); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure getCurrentSession() { return currentSession_; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructureOrBuilder getCurrentSessionOrBuilder() { return currentSession_; } // repeated .textsecure.SessionStructure previousSessions = 2; public static final int PREVIOUSSESSIONS_FIELD_NUMBER = 2; private java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure> previousSessions_; public java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure> getPreviousSessionsList() { return previousSessions_; } public java.util.List<? extends org.whispersystems.textsecure.storage.StorageProtos.SessionStructureOrBuilder> getPreviousSessionsOrBuilderList() { return previousSessions_; } public int getPreviousSessionsCount() { return previousSessions_.size(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure getPreviousSessions(int index) { return previousSessions_.get(index); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructureOrBuilder getPreviousSessionsOrBuilder( int index) { return previousSessions_.get(index); } private void initFields() { currentSession_ = org.whispersystems.textsecure.storage.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; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.whispersystems.textsecure.storage.StorageProtos.RecordStructure parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.RecordStructure parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.RecordStructure parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.RecordStructure parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.RecordStructure parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.RecordStructure parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.RecordStructure parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { return builder.buildParsed(); } else { return null; } } public static org.whispersystems.textsecure.storage.StorageProtos.RecordStructure parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input, extensionRegistry)) { return builder.buildParsed(); } else { return null; } } public static org.whispersystems.textsecure.storage.StorageProtos.RecordStructure parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.RecordStructure parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.whispersystems.textsecure.storage.StorageProtos.RecordStructure prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements org.whispersystems.textsecure.storage.StorageProtos.RecordStructureOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_RecordStructure_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_RecordStructure_fieldAccessorTable; } // Construct using org.whispersystems.textsecure.storage.StorageProtos.RecordStructure.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getCurrentSessionFieldBuilder(); getPreviousSessionsFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); if (currentSessionBuilder_ == null) { currentSession_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.getDefaultInstance(); } else { currentSessionBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); if (previousSessionsBuilder_ == null) { previousSessions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { previousSessionsBuilder_.clear(); } return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.whispersystems.textsecure.storage.StorageProtos.RecordStructure.getDescriptor(); } public org.whispersystems.textsecure.storage.StorageProtos.RecordStructure getDefaultInstanceForType() { return org.whispersystems.textsecure.storage.StorageProtos.RecordStructure.getDefaultInstance(); } public org.whispersystems.textsecure.storage.StorageProtos.RecordStructure build() { org.whispersystems.textsecure.storage.StorageProtos.RecordStructure result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } private org.whispersystems.textsecure.storage.StorageProtos.RecordStructure buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { org.whispersystems.textsecure.storage.StorageProtos.RecordStructure result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } return result; } public org.whispersystems.textsecure.storage.StorageProtos.RecordStructure buildPartial() { org.whispersystems.textsecure.storage.StorageProtos.RecordStructure result = new org.whispersystems.textsecure.storage.StorageProtos.RecordStructure(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } if (currentSessionBuilder_ == null) { result.currentSession_ = currentSession_; } else { result.currentSession_ = currentSessionBuilder_.build(); } if (previousSessionsBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { previousSessions_ = java.util.Collections.unmodifiableList(previousSessions_); bitField0_ = (bitField0_ & ~0x00000002); } result.previousSessions_ = previousSessions_; } else { result.previousSessions_ = previousSessionsBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.whispersystems.textsecure.storage.StorageProtos.RecordStructure) { return mergeFrom((org.whispersystems.textsecure.storage.StorageProtos.RecordStructure)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.whispersystems.textsecure.storage.StorageProtos.RecordStructure other) { if (other == org.whispersystems.textsecure.storage.StorageProtos.RecordStructure.getDefaultInstance()) return this; if (other.hasCurrentSession()) { mergeCurrentSession(other.getCurrentSession()); } if (previousSessionsBuilder_ == null) { if (!other.previousSessions_.isEmpty()) { if (previousSessions_.isEmpty()) { previousSessions_ = other.previousSessions_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensurePreviousSessionsIsMutable(); previousSessions_.addAll(other.previousSessions_); } onChanged(); } } else { if (!other.previousSessions_.isEmpty()) { if (previousSessionsBuilder_.isEmpty()) { previousSessionsBuilder_.dispose(); previousSessionsBuilder_ = null; previousSessions_ = other.previousSessions_; bitField0_ = (bitField0_ & ~0x00000002); previousSessionsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPreviousSessionsFieldBuilder() : null; } else { previousSessionsBuilder_.addAllMessages(other.previousSessions_); } } } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder( this.getUnknownFields()); while (true) { int tag = input.readTag(); switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); onChanged(); return this; } break; } case 10: { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder subBuilder = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.newBuilder(); if (hasCurrentSession()) { subBuilder.mergeFrom(getCurrentSession()); } input.readMessage(subBuilder, extensionRegistry); setCurrentSession(subBuilder.buildPartial()); break; } case 18: { org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder subBuilder = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.newBuilder(); input.readMessage(subBuilder, extensionRegistry); addPreviousSessions(subBuilder.buildPartial()); break; } } } } private int bitField0_; // optional .textsecure.SessionStructure currentSession = 1; private org.whispersystems.textsecure.storage.StorageProtos.SessionStructure currentSession_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructureOrBuilder> currentSessionBuilder_; public boolean hasCurrentSession() { return ((bitField0_ & 0x00000001) == 0x00000001); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure getCurrentSession() { if (currentSessionBuilder_ == null) { return currentSession_; } else { return currentSessionBuilder_.getMessage(); } } public Builder setCurrentSession(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure value) { if (currentSessionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } currentSession_ = value; onChanged(); } else { currentSessionBuilder_.setMessage(value); } bitField0_ |= 0x00000001; return this; } public Builder setCurrentSession( org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder builderForValue) { if (currentSessionBuilder_ == null) { currentSession_ = builderForValue.build(); onChanged(); } else { currentSessionBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } public Builder mergeCurrentSession(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure value) { if (currentSessionBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && currentSession_ != org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.getDefaultInstance()) { currentSession_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.newBuilder(currentSession_).mergeFrom(value).buildPartial(); } else { currentSession_ = value; } onChanged(); } else { currentSessionBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; return this; } public Builder clearCurrentSession() { if (currentSessionBuilder_ == null) { currentSession_ = org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.getDefaultInstance(); onChanged(); } else { currentSessionBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder getCurrentSessionBuilder() { bitField0_ |= 0x00000001; onChanged(); return getCurrentSessionFieldBuilder().getBuilder(); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructureOrBuilder getCurrentSessionOrBuilder() { if (currentSessionBuilder_ != null) { return currentSessionBuilder_.getMessageOrBuilder(); } else { return currentSession_; } } private com.google.protobuf.SingleFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructureOrBuilder> getCurrentSessionFieldBuilder() { if (currentSessionBuilder_ == null) { currentSessionBuilder_ = new com.google.protobuf.SingleFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructureOrBuilder>( currentSession_, getParentForChildren(), isClean()); currentSession_ = null; } return currentSessionBuilder_; } // repeated .textsecure.SessionStructure previousSessions = 2; private java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure> previousSessions_ = java.util.Collections.emptyList(); private void ensurePreviousSessionsIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { previousSessions_ = new java.util.ArrayList<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure>(previousSessions_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructureOrBuilder> previousSessionsBuilder_; public java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure> getPreviousSessionsList() { if (previousSessionsBuilder_ == null) { return java.util.Collections.unmodifiableList(previousSessions_); } else { return previousSessionsBuilder_.getMessageList(); } } public int getPreviousSessionsCount() { if (previousSessionsBuilder_ == null) { return previousSessions_.size(); } else { return previousSessionsBuilder_.getCount(); } } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure getPreviousSessions(int index) { if (previousSessionsBuilder_ == null) { return previousSessions_.get(index); } else { return previousSessionsBuilder_.getMessage(index); } } public Builder setPreviousSessions( int index, org.whispersystems.textsecure.storage.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; } public Builder setPreviousSessions( int index, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder builderForValue) { if (previousSessionsBuilder_ == null) { ensurePreviousSessionsIsMutable(); previousSessions_.set(index, builderForValue.build()); onChanged(); } else { previousSessionsBuilder_.setMessage(index, builderForValue.build()); } return this; } public Builder addPreviousSessions(org.whispersystems.textsecure.storage.StorageProtos.SessionStructure value) { if (previousSessionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePreviousSessionsIsMutable(); previousSessions_.add(value); onChanged(); } else { previousSessionsBuilder_.addMessage(value); } return this; } public Builder addPreviousSessions( int index, org.whispersystems.textsecure.storage.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; } public Builder addPreviousSessions( org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder builderForValue) { if (previousSessionsBuilder_ == null) { ensurePreviousSessionsIsMutable(); previousSessions_.add(builderForValue.build()); onChanged(); } else { previousSessionsBuilder_.addMessage(builderForValue.build()); } return this; } public Builder addPreviousSessions( int index, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder builderForValue) { if (previousSessionsBuilder_ == null) { ensurePreviousSessionsIsMutable(); previousSessions_.add(index, builderForValue.build()); onChanged(); } else { previousSessionsBuilder_.addMessage(index, builderForValue.build()); } return this; } public Builder addAllPreviousSessions( java.lang.Iterable<? extends org.whispersystems.textsecure.storage.StorageProtos.SessionStructure> values) { if (previousSessionsBuilder_ == null) { ensurePreviousSessionsIsMutable(); super.addAll(values, previousSessions_); onChanged(); } else { previousSessionsBuilder_.addAllMessages(values); } return this; } public Builder clearPreviousSessions() { if (previousSessionsBuilder_ == null) { previousSessions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { previousSessionsBuilder_.clear(); } return this; } public Builder removePreviousSessions(int index) { if (previousSessionsBuilder_ == null) { ensurePreviousSessionsIsMutable(); previousSessions_.remove(index); onChanged(); } else { previousSessionsBuilder_.remove(index); } return this; } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder getPreviousSessionsBuilder( int index) { return getPreviousSessionsFieldBuilder().getBuilder(index); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructureOrBuilder getPreviousSessionsOrBuilder( int index) { if (previousSessionsBuilder_ == null) { return previousSessions_.get(index); } else { return previousSessionsBuilder_.getMessageOrBuilder(index); } } public java.util.List<? extends org.whispersystems.textsecure.storage.StorageProtos.SessionStructureOrBuilder> getPreviousSessionsOrBuilderList() { if (previousSessionsBuilder_ != null) { return previousSessionsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(previousSessions_); } } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder addPreviousSessionsBuilder() { return getPreviousSessionsFieldBuilder().addBuilder( org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.getDefaultInstance()); } public org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder addPreviousSessionsBuilder( int index) { return getPreviousSessionsFieldBuilder().addBuilder( index, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.getDefaultInstance()); } public java.util.List<org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder> getPreviousSessionsBuilderList() { return getPreviousSessionsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructureOrBuilder> getPreviousSessionsFieldBuilder() { if (previousSessionsBuilder_ == null) { previousSessionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.whispersystems.textsecure.storage.StorageProtos.SessionStructure, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder, org.whispersystems.textsecure.storage.StorageProtos.SessionStructureOrBuilder>( previousSessions_, ((bitField0_ & 0x00000002) == 0x00000002), getParentForChildren(), isClean()); previousSessions_ = null; } return previousSessionsBuilder_; } // @@protoc_insertion_point(builder_scope:textsecure.RecordStructure) } static { defaultInstance = new RecordStructure(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:textsecure.RecordStructure) } public interface PreKeyRecordStructureOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional uint32 id = 1; boolean hasId(); int getId(); // optional bytes publicKey = 2; boolean hasPublicKey(); com.google.protobuf.ByteString getPublicKey(); // optional bytes privateKey = 3; boolean hasPrivateKey(); com.google.protobuf.ByteString getPrivateKey(); } public static final class PreKeyRecordStructure extends com.google.protobuf.GeneratedMessage implements PreKeyRecordStructureOrBuilder { // Use PreKeyRecordStructure.newBuilder() to construct. private PreKeyRecordStructure(Builder builder) { super(builder); } private PreKeyRecordStructure(boolean noInit) {} private static final PreKeyRecordStructure defaultInstance; public static PreKeyRecordStructure getDefaultInstance() { return defaultInstance; } public PreKeyRecordStructure getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_PreKeyRecordStructure_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_PreKeyRecordStructure_fieldAccessorTable; } private int bitField0_; // optional uint32 id = 1; public static final int ID_FIELD_NUMBER = 1; private int id_; public boolean hasId() { return ((bitField0_ & 0x00000001) == 0x00000001); } public int getId() { return id_; } // optional bytes publicKey = 2; public static final int PUBLICKEY_FIELD_NUMBER = 2; private com.google.protobuf.ByteString publicKey_; public boolean hasPublicKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } 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_; public boolean hasPrivateKey() { return ((bitField0_ & 0x00000004) == 0x00000004); } 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; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { return builder.buildParsed(); } else { return null; } } public static org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input, extensionRegistry)) { return builder.buildParsed(); } else { return null; } } public static org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructureOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_PreKeyRecordStructure_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return org.whispersystems.textsecure.storage.StorageProtos.internal_static_textsecure_PreKeyRecordStructure_fieldAccessorTable; } // Construct using org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); id_ = 0; bitField0_ = (bitField0_ & ~0x00000001); publicKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); privateKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure.getDescriptor(); } public org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure getDefaultInstanceForType() { return org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure.getDefaultInstance(); } public org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure build() { org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } private org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } return result; } public org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure buildPartial() { org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure result = new org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.id_ = id_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.publicKey_ = publicKey_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.privateKey_ = privateKey_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure) { return mergeFrom((org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure other) { if (other == org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure.getDefaultInstance()) return this; if (other.hasId()) { setId(other.getId()); } if (other.hasPublicKey()) { setPublicKey(other.getPublicKey()); } if (other.hasPrivateKey()) { setPrivateKey(other.getPrivateKey()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder( this.getUnknownFields()); while (true) { int tag = input.readTag(); switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); onChanged(); return this; } break; } case 8: { bitField0_ |= 0x00000001; id_ = input.readUInt32(); break; } case 18: { bitField0_ |= 0x00000002; publicKey_ = input.readBytes(); break; } case 26: { bitField0_ |= 0x00000004; privateKey_ = input.readBytes(); break; } } } } private int bitField0_; // optional uint32 id = 1; private int id_ ; public boolean hasId() { return ((bitField0_ & 0x00000001) == 0x00000001); } public int getId() { return id_; } public Builder setId(int value) { bitField0_ |= 0x00000001; id_ = value; onChanged(); return this; } 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; public boolean hasPublicKey() { return ((bitField0_ & 0x00000002) == 0x00000002); } public com.google.protobuf.ByteString getPublicKey() { return publicKey_; } public Builder setPublicKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; publicKey_ = value; onChanged(); return this; } 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; public boolean hasPrivateKey() { return ((bitField0_ & 0x00000004) == 0x00000004); } public com.google.protobuf.ByteString getPrivateKey() { return privateKey_; } public Builder setPrivateKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; privateKey_ = value; onChanged(); return this; } 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) } private static com.google.protobuf.Descriptors.Descriptor internal_static_textsecure_SessionStructure_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_textsecure_SessionStructure_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_textsecure_SessionStructure_Chain_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_textsecure_SessionStructure_Chain_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_textsecure_SessionStructure_Chain_ChainKey_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_textsecure_SessionStructure_Chain_ChainKey_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_textsecure_SessionStructure_Chain_MessageKey_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_textsecure_SessionStructure_Chain_MessageKey_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_textsecure_SessionStructure_PendingKeyExchange_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_textsecure_SessionStructure_PendingKeyExchange_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_textsecure_SessionStructure_PendingPreKey_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_textsecure_SessionStructure_PendingPreKey_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_textsecure_RecordStructure_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_textsecure_RecordStructure_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_textsecure_PreKeyRecordStructure_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_textsecure_PreKeyRecordStructure_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n\032LocalStorageProtocol.proto\022\ntextsecure" + "\"\233\010\n\020SessionStructure\022\026\n\016sessionVersion\030" + "\001 \001(\r\022\033\n\023localIdentityPublic\030\002 \001(\014\022\034\n\024re" + "moteIdentityPublic\030\003 \001(\014\022\017\n\007rootKey\030\004 \001(" + "\014\022\027\n\017previousCounter\030\005 \001(\r\0227\n\013senderChai" + "n\030\006 \001(\0132\".textsecure.SessionStructure.Ch" + "ain\022:\n\016receiverChains\030\007 \003(\0132\".textsecure" + ".SessionStructure.Chain\022K\n\022pendingKeyExc" + "hange\030\010 \001(\0132/.textsecure.SessionStructur" + "e.PendingKeyExchange\022A\n\rpendingPreKey\030\t ", "\001(\0132*.textsecure.SessionStructure.Pendin" + "gPreKey\022\034\n\024remoteRegistrationId\030\n \001(\r\022\033\n" + "\023localRegistrationId\030\013 \001(\r\022\024\n\014needsRefre" + "sh\030\014 \001(\010\032\253\002\n\005Chain\022\027\n\017senderEphemeral\030\001 " + "\001(\014\022\036\n\026senderEphemeralPrivate\030\002 \001(\014\022=\n\010c" + "hainKey\030\003 \001(\0132+.textsecure.SessionStruct" + "ure.Chain.ChainKey\022B\n\013messageKeys\030\004 \003(\0132" + "-.textsecure.SessionStructure.Chain.Mess" + "ageKey\032&\n\010ChainKey\022\r\n\005index\030\001 \001(\r\022\013\n\003key" + "\030\002 \001(\014\032>\n\nMessageKey\022\r\n\005index\030\001 \001(\r\022\021\n\tc", "ipherKey\030\002 \001(\014\022\016\n\006macKey\030\003 \001(\014\032\321\001\n\022Pendi" + "ngKeyExchange\022\020\n\010sequence\030\001 \001(\r\022\024\n\014local" + "BaseKey\030\002 \001(\014\022\033\n\023localBaseKeyPrivate\030\003 \001" + "(\014\022\031\n\021localEphemeralKey\030\004 \001(\014\022 \n\030localEp" + "hemeralKeyPrivate\030\005 \001(\014\022\030\n\020localIdentity" + "Key\030\007 \001(\014\022\037\n\027localIdentityKeyPrivate\030\010 \001" + "(\014\0322\n\rPendingPreKey\022\020\n\010preKeyId\030\001 \001(\r\022\017\n" + "\007baseKey\030\002 \001(\014\"\177\n\017RecordStructure\0224\n\016cur" + "rentSession\030\001 \001(\0132\034.textsecure.SessionSt" + "ructure\0226\n\020previousSessions\030\002 \003(\0132\034.text", "secure.SessionStructure\"J\n\025PreKeyRecordS" + "tructure\022\n\n\002id\030\001 \001(\r\022\021\n\tpublicKey\030\002 \001(\014\022" + "\022\n\nprivateKey\030\003 \001(\014B6\n%org.whispersystem" + "s.textsecure.storageB\rStorageProtos" }; 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_SessionStructure_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_textsecure_SessionStructure_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_textsecure_SessionStructure_descriptor, new java.lang.String[] { "SessionVersion", "LocalIdentityPublic", "RemoteIdentityPublic", "RootKey", "PreviousCounter", "SenderChain", "ReceiverChains", "PendingKeyExchange", "PendingPreKey", "RemoteRegistrationId", "LocalRegistrationId", "NeedsRefresh", }, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.class, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Builder.class); internal_static_textsecure_SessionStructure_Chain_descriptor = internal_static_textsecure_SessionStructure_descriptor.getNestedTypes().get(0); internal_static_textsecure_SessionStructure_Chain_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_textsecure_SessionStructure_Chain_descriptor, new java.lang.String[] { "SenderEphemeral", "SenderEphemeralPrivate", "ChainKey", "MessageKeys", }, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.class, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.Builder.class); internal_static_textsecure_SessionStructure_Chain_ChainKey_descriptor = internal_static_textsecure_SessionStructure_Chain_descriptor.getNestedTypes().get(0); internal_static_textsecure_SessionStructure_Chain_ChainKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_textsecure_SessionStructure_Chain_ChainKey_descriptor, new java.lang.String[] { "Index", "Key", }, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.class, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.ChainKey.Builder.class); internal_static_textsecure_SessionStructure_Chain_MessageKey_descriptor = internal_static_textsecure_SessionStructure_Chain_descriptor.getNestedTypes().get(1); internal_static_textsecure_SessionStructure_Chain_MessageKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_textsecure_SessionStructure_Chain_MessageKey_descriptor, new java.lang.String[] { "Index", "CipherKey", "MacKey", }, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.class, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.Chain.MessageKey.Builder.class); internal_static_textsecure_SessionStructure_PendingKeyExchange_descriptor = internal_static_textsecure_SessionStructure_descriptor.getNestedTypes().get(1); internal_static_textsecure_SessionStructure_PendingKeyExchange_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_textsecure_SessionStructure_PendingKeyExchange_descriptor, new java.lang.String[] { "Sequence", "LocalBaseKey", "LocalBaseKeyPrivate", "LocalEphemeralKey", "LocalEphemeralKeyPrivate", "LocalIdentityKey", "LocalIdentityKeyPrivate", }, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.class, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingKeyExchange.Builder.class); internal_static_textsecure_SessionStructure_PendingPreKey_descriptor = internal_static_textsecure_SessionStructure_descriptor.getNestedTypes().get(2); internal_static_textsecure_SessionStructure_PendingPreKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_textsecure_SessionStructure_PendingPreKey_descriptor, new java.lang.String[] { "PreKeyId", "BaseKey", }, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.class, org.whispersystems.textsecure.storage.StorageProtos.SessionStructure.PendingPreKey.Builder.class); internal_static_textsecure_RecordStructure_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_textsecure_RecordStructure_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_textsecure_RecordStructure_descriptor, new java.lang.String[] { "CurrentSession", "PreviousSessions", }, org.whispersystems.textsecure.storage.StorageProtos.RecordStructure.class, org.whispersystems.textsecure.storage.StorageProtos.RecordStructure.Builder.class); internal_static_textsecure_PreKeyRecordStructure_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_textsecure_PreKeyRecordStructure_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_textsecure_PreKeyRecordStructure_descriptor, new java.lang.String[] { "Id", "PublicKey", "PrivateKey", }, org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure.class, org.whispersystems.textsecure.storage.StorageProtos.PreKeyRecordStructure.Builder.class); return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); } // @@protoc_insertion_point(outer_class_scope) }