org.whispersystems.textsecure.internal.push.TextSecureProtos Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: TextSecure.proto
package org.whispersystems.textsecure.internal.push;
public final class TextSecureProtos {
private TextSecureProtos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
public interface EnvelopeOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional .textsecure.Envelope.Type type = 1;
/**
* optional .textsecure.Envelope.Type type = 1;
*/
boolean hasType();
/**
* optional .textsecure.Envelope.Type type = 1;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.Type getType();
// optional string source = 2;
/**
* optional string source = 2;
*/
boolean hasSource();
/**
* optional string source = 2;
*/
java.lang.String getSource();
/**
* optional string source = 2;
*/
com.google.protobuf.ByteString
getSourceBytes();
// optional uint32 sourceDevice = 7;
/**
* optional uint32 sourceDevice = 7;
*/
boolean hasSourceDevice();
/**
* optional uint32 sourceDevice = 7;
*/
int getSourceDevice();
// optional string relay = 3;
/**
* optional string relay = 3;
*/
boolean hasRelay();
/**
* optional string relay = 3;
*/
java.lang.String getRelay();
/**
* optional string relay = 3;
*/
com.google.protobuf.ByteString
getRelayBytes();
// optional uint64 timestamp = 5;
/**
* optional uint64 timestamp = 5;
*/
boolean hasTimestamp();
/**
* optional uint64 timestamp = 5;
*/
long getTimestamp();
// optional bytes legacyMessage = 6;
/**
* optional bytes legacyMessage = 6;
*
*
* Contains an encrypted DataMessage
*
*/
boolean hasLegacyMessage();
/**
* optional bytes legacyMessage = 6;
*
*
* Contains an encrypted DataMessage
*
*/
com.google.protobuf.ByteString getLegacyMessage();
// optional bytes content = 8;
/**
* optional bytes content = 8;
*
*
* Contains an encrypted Content
*
*/
boolean hasContent();
/**
* optional bytes content = 8;
*
*
* Contains an encrypted Content
*
*/
com.google.protobuf.ByteString getContent();
}
/**
* Protobuf type {@code textsecure.Envelope}
*/
public static final class Envelope extends
com.google.protobuf.GeneratedMessage
implements EnvelopeOrBuilder {
// Use Envelope.newBuilder() to construct.
private Envelope(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private Envelope(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final Envelope defaultInstance;
public static Envelope getDefaultInstance() {
return defaultInstance;
}
public Envelope getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Envelope(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.Type value = org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.Type.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(1, rawValue);
} else {
bitField0_ |= 0x00000001;
type_ = value;
}
break;
}
case 18: {
bitField0_ |= 0x00000002;
source_ = input.readBytes();
break;
}
case 26: {
bitField0_ |= 0x00000008;
relay_ = input.readBytes();
break;
}
case 40: {
bitField0_ |= 0x00000010;
timestamp_ = input.readUInt64();
break;
}
case 50: {
bitField0_ |= 0x00000020;
legacyMessage_ = input.readBytes();
break;
}
case 56: {
bitField0_ |= 0x00000004;
sourceDevice_ = input.readUInt32();
break;
}
case 66: {
bitField0_ |= 0x00000040;
content_ = input.readBytes();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_Envelope_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_Envelope_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public Envelope parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Envelope(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
/**
* Protobuf enum {@code textsecure.Envelope.Type}
*/
public enum Type
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN = 0;
*/
UNKNOWN(0, 0),
/**
* CIPHERTEXT = 1;
*/
CIPHERTEXT(1, 1),
/**
* KEY_EXCHANGE = 2;
*/
KEY_EXCHANGE(2, 2),
/**
* PREKEY_BUNDLE = 3;
*/
PREKEY_BUNDLE(3, 3),
/**
* RECEIPT = 5;
*/
RECEIPT(4, 5),
;
/**
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
/**
* CIPHERTEXT = 1;
*/
public static final int CIPHERTEXT_VALUE = 1;
/**
* KEY_EXCHANGE = 2;
*/
public static final int KEY_EXCHANGE_VALUE = 2;
/**
* PREKEY_BUNDLE = 3;
*/
public static final int PREKEY_BUNDLE_VALUE = 3;
/**
* RECEIPT = 5;
*/
public static final int RECEIPT_VALUE = 5;
public final int getNumber() { return value; }
public static Type valueOf(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return CIPHERTEXT;
case 2: return KEY_EXCHANGE;
case 3: return PREKEY_BUNDLE;
case 5: return RECEIPT;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Type findValueByNumber(int number) {
return Type.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.getDescriptor().getEnumTypes().get(0);
}
private static final Type[] VALUES = values();
public static Type valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private Type(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:textsecure.Envelope.Type)
}
private int bitField0_;
// optional .textsecure.Envelope.Type type = 1;
public static final int TYPE_FIELD_NUMBER = 1;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.Type type_;
/**
* optional .textsecure.Envelope.Type type = 1;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .textsecure.Envelope.Type type = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.Type getType() {
return type_;
}
// optional string source = 2;
public static final int SOURCE_FIELD_NUMBER = 2;
private java.lang.Object source_;
/**
* optional string source = 2;
*/
public boolean hasSource() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional string source = 2;
*/
public java.lang.String getSource() {
java.lang.Object ref = source_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
source_ = s;
}
return s;
}
}
/**
* optional string source = 2;
*/
public com.google.protobuf.ByteString
getSourceBytes() {
java.lang.Object ref = source_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
source_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional uint32 sourceDevice = 7;
public static final int SOURCEDEVICE_FIELD_NUMBER = 7;
private int sourceDevice_;
/**
* optional uint32 sourceDevice = 7;
*/
public boolean hasSourceDevice() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional uint32 sourceDevice = 7;
*/
public int getSourceDevice() {
return sourceDevice_;
}
// optional string relay = 3;
public static final int RELAY_FIELD_NUMBER = 3;
private java.lang.Object relay_;
/**
* optional string relay = 3;
*/
public boolean hasRelay() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional string relay = 3;
*/
public java.lang.String getRelay() {
java.lang.Object ref = relay_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
relay_ = s;
}
return s;
}
}
/**
* optional string relay = 3;
*/
public com.google.protobuf.ByteString
getRelayBytes() {
java.lang.Object ref = relay_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
relay_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional uint64 timestamp = 5;
public static final int TIMESTAMP_FIELD_NUMBER = 5;
private long timestamp_;
/**
* optional uint64 timestamp = 5;
*/
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional uint64 timestamp = 5;
*/
public long getTimestamp() {
return timestamp_;
}
// optional bytes legacyMessage = 6;
public static final int LEGACYMESSAGE_FIELD_NUMBER = 6;
private com.google.protobuf.ByteString legacyMessage_;
/**
* optional bytes legacyMessage = 6;
*
*
* Contains an encrypted DataMessage
*
*/
public boolean hasLegacyMessage() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* optional bytes legacyMessage = 6;
*
*
* Contains an encrypted DataMessage
*
*/
public com.google.protobuf.ByteString getLegacyMessage() {
return legacyMessage_;
}
// optional bytes content = 8;
public static final int CONTENT_FIELD_NUMBER = 8;
private com.google.protobuf.ByteString content_;
/**
* optional bytes content = 8;
*
*
* Contains an encrypted Content
*
*/
public boolean hasContent() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
* optional bytes content = 8;
*
*
* Contains an encrypted Content
*
*/
public com.google.protobuf.ByteString getContent() {
return content_;
}
private void initFields() {
type_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.Type.UNKNOWN;
source_ = "";
sourceDevice_ = 0;
relay_ = "";
timestamp_ = 0L;
legacyMessage_ = com.google.protobuf.ByteString.EMPTY;
content_ = com.google.protobuf.ByteString.EMPTY;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeEnum(1, type_.getNumber());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBytes(2, getSourceBytes());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeBytes(3, getRelayBytes());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeUInt64(5, timestamp_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
output.writeBytes(6, legacyMessage_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeUInt32(7, sourceDevice_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
output.writeBytes(8, content_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, type_.getNumber());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, getSourceBytes());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, getRelayBytes());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(5, timestamp_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(6, legacyMessage_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(7, sourceDevice_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(8, content_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code textsecure.Envelope}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.whispersystems.textsecure.internal.push.TextSecureProtos.EnvelopeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_Envelope_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_Envelope_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.Builder.class);
}
// Construct using org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
type_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.Type.UNKNOWN;
bitField0_ = (bitField0_ & ~0x00000001);
source_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
sourceDevice_ = 0;
bitField0_ = (bitField0_ & ~0x00000004);
relay_ = "";
bitField0_ = (bitField0_ & ~0x00000008);
timestamp_ = 0L;
bitField0_ = (bitField0_ & ~0x00000010);
legacyMessage_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000020);
content_ = 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.internal.push.TextSecureProtos.internal_static_textsecure_Envelope_descriptor;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope getDefaultInstanceForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.getDefaultInstance();
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope build() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope buildPartial() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope result = new org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.type_ = type_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.source_ = source_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.sourceDevice_ = sourceDevice_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.relay_ = relay_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
result.timestamp_ = timestamp_;
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x00000020;
}
result.legacyMessage_ = legacyMessage_;
if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
to_bitField0_ |= 0x00000040;
}
result.content_ = content_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope) {
return mergeFrom((org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope other) {
if (other == org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.getDefaultInstance()) return this;
if (other.hasType()) {
setType(other.getType());
}
if (other.hasSource()) {
bitField0_ |= 0x00000002;
source_ = other.source_;
onChanged();
}
if (other.hasSourceDevice()) {
setSourceDevice(other.getSourceDevice());
}
if (other.hasRelay()) {
bitField0_ |= 0x00000008;
relay_ = other.relay_;
onChanged();
}
if (other.hasTimestamp()) {
setTimestamp(other.getTimestamp());
}
if (other.hasLegacyMessage()) {
setLegacyMessage(other.getLegacyMessage());
}
if (other.hasContent()) {
setContent(other.getContent());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional .textsecure.Envelope.Type type = 1;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.Type type_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.Type.UNKNOWN;
/**
* optional .textsecure.Envelope.Type type = 1;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .textsecure.Envelope.Type type = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.Type getType() {
return type_;
}
/**
* optional .textsecure.Envelope.Type type = 1;
*/
public Builder setType(org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.Type value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value;
onChanged();
return this;
}
/**
* optional .textsecure.Envelope.Type type = 1;
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000001);
type_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.Envelope.Type.UNKNOWN;
onChanged();
return this;
}
// optional string source = 2;
private java.lang.Object source_ = "";
/**
* optional string source = 2;
*/
public boolean hasSource() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional string source = 2;
*/
public java.lang.String getSource() {
java.lang.Object ref = source_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
source_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string source = 2;
*/
public com.google.protobuf.ByteString
getSourceBytes() {
java.lang.Object ref = source_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
source_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string source = 2;
*/
public Builder setSource(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
source_ = value;
onChanged();
return this;
}
/**
* optional string source = 2;
*/
public Builder clearSource() {
bitField0_ = (bitField0_ & ~0x00000002);
source_ = getDefaultInstance().getSource();
onChanged();
return this;
}
/**
* optional string source = 2;
*/
public Builder setSourceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
source_ = value;
onChanged();
return this;
}
// optional uint32 sourceDevice = 7;
private int sourceDevice_ ;
/**
* optional uint32 sourceDevice = 7;
*/
public boolean hasSourceDevice() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional uint32 sourceDevice = 7;
*/
public int getSourceDevice() {
return sourceDevice_;
}
/**
* optional uint32 sourceDevice = 7;
*/
public Builder setSourceDevice(int value) {
bitField0_ |= 0x00000004;
sourceDevice_ = value;
onChanged();
return this;
}
/**
* optional uint32 sourceDevice = 7;
*/
public Builder clearSourceDevice() {
bitField0_ = (bitField0_ & ~0x00000004);
sourceDevice_ = 0;
onChanged();
return this;
}
// optional string relay = 3;
private java.lang.Object relay_ = "";
/**
* optional string relay = 3;
*/
public boolean hasRelay() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional string relay = 3;
*/
public java.lang.String getRelay() {
java.lang.Object ref = relay_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
relay_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string relay = 3;
*/
public com.google.protobuf.ByteString
getRelayBytes() {
java.lang.Object ref = relay_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
relay_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string relay = 3;
*/
public Builder setRelay(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
relay_ = value;
onChanged();
return this;
}
/**
* optional string relay = 3;
*/
public Builder clearRelay() {
bitField0_ = (bitField0_ & ~0x00000008);
relay_ = getDefaultInstance().getRelay();
onChanged();
return this;
}
/**
* optional string relay = 3;
*/
public Builder setRelayBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
relay_ = value;
onChanged();
return this;
}
// optional uint64 timestamp = 5;
private long timestamp_ ;
/**
* optional uint64 timestamp = 5;
*/
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional uint64 timestamp = 5;
*/
public long getTimestamp() {
return timestamp_;
}
/**
* optional uint64 timestamp = 5;
*/
public Builder setTimestamp(long value) {
bitField0_ |= 0x00000010;
timestamp_ = value;
onChanged();
return this;
}
/**
* optional uint64 timestamp = 5;
*/
public Builder clearTimestamp() {
bitField0_ = (bitField0_ & ~0x00000010);
timestamp_ = 0L;
onChanged();
return this;
}
// optional bytes legacyMessage = 6;
private com.google.protobuf.ByteString legacyMessage_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes legacyMessage = 6;
*
*
* Contains an encrypted DataMessage
*
*/
public boolean hasLegacyMessage() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* optional bytes legacyMessage = 6;
*
*
* Contains an encrypted DataMessage
*
*/
public com.google.protobuf.ByteString getLegacyMessage() {
return legacyMessage_;
}
/**
* optional bytes legacyMessage = 6;
*
*
* Contains an encrypted DataMessage
*
*/
public Builder setLegacyMessage(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
legacyMessage_ = value;
onChanged();
return this;
}
/**
* optional bytes legacyMessage = 6;
*
*
* Contains an encrypted DataMessage
*
*/
public Builder clearLegacyMessage() {
bitField0_ = (bitField0_ & ~0x00000020);
legacyMessage_ = getDefaultInstance().getLegacyMessage();
onChanged();
return this;
}
// optional bytes content = 8;
private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes content = 8;
*
*
* Contains an encrypted Content
*
*/
public boolean hasContent() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
/**
* optional bytes content = 8;
*
*
* Contains an encrypted Content
*
*/
public com.google.protobuf.ByteString getContent() {
return content_;
}
/**
* optional bytes content = 8;
*
*
* Contains an encrypted Content
*
*/
public Builder setContent(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000040;
content_ = value;
onChanged();
return this;
}
/**
* optional bytes content = 8;
*
*
* Contains an encrypted Content
*
*/
public Builder clearContent() {
bitField0_ = (bitField0_ & ~0x00000040);
content_ = getDefaultInstance().getContent();
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:textsecure.Envelope)
}
static {
defaultInstance = new Envelope(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:textsecure.Envelope)
}
public interface ContentOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional .textsecure.DataMessage dataMessage = 1;
/**
* optional .textsecure.DataMessage dataMessage = 1;
*/
boolean hasDataMessage();
/**
* optional .textsecure.DataMessage dataMessage = 1;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage getDataMessage();
/**
* optional .textsecure.DataMessage dataMessage = 1;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessageOrBuilder getDataMessageOrBuilder();
// optional .textsecure.SyncMessage syncMessage = 2;
/**
* optional .textsecure.SyncMessage syncMessage = 2;
*/
boolean hasSyncMessage();
/**
* optional .textsecure.SyncMessage syncMessage = 2;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage getSyncMessage();
/**
* optional .textsecure.SyncMessage syncMessage = 2;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessageOrBuilder getSyncMessageOrBuilder();
}
/**
* Protobuf type {@code textsecure.Content}
*/
public static final class Content extends
com.google.protobuf.GeneratedMessage
implements ContentOrBuilder {
// Use Content.newBuilder() to construct.
private Content(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private Content(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final Content defaultInstance;
public static Content getDefaultInstance() {
return defaultInstance;
}
public Content getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Content(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.Builder subBuilder = null;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
subBuilder = dataMessage_.toBuilder();
}
dataMessage_ = input.readMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(dataMessage_);
dataMessage_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break;
}
case 18: {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Builder subBuilder = null;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
subBuilder = syncMessage_.toBuilder();
}
syncMessage_ = input.readMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(syncMessage_);
syncMessage_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_Content_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_Content_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.Content.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.Content.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public Content parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Content(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
// optional .textsecure.DataMessage dataMessage = 1;
public static final int DATAMESSAGE_FIELD_NUMBER = 1;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage dataMessage_;
/**
* optional .textsecure.DataMessage dataMessage = 1;
*/
public boolean hasDataMessage() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .textsecure.DataMessage dataMessage = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage getDataMessage() {
return dataMessage_;
}
/**
* optional .textsecure.DataMessage dataMessage = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessageOrBuilder getDataMessageOrBuilder() {
return dataMessage_;
}
// optional .textsecure.SyncMessage syncMessage = 2;
public static final int SYNCMESSAGE_FIELD_NUMBER = 2;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage syncMessage_;
/**
* optional .textsecure.SyncMessage syncMessage = 2;
*/
public boolean hasSyncMessage() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional .textsecure.SyncMessage syncMessage = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage getSyncMessage() {
return syncMessage_;
}
/**
* optional .textsecure.SyncMessage syncMessage = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessageOrBuilder getSyncMessageOrBuilder() {
return syncMessage_;
}
private void initFields() {
dataMessage_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.getDefaultInstance();
syncMessage_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(1, dataMessage_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(2, syncMessage_);
}
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, dataMessage_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, syncMessage_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Content parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Content parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Content parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Content parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Content parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Content parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Content parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Content parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Content parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.Content parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.whispersystems.textsecure.internal.push.TextSecureProtos.Content prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code textsecure.Content}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.whispersystems.textsecure.internal.push.TextSecureProtos.ContentOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_Content_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_Content_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.Content.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.Content.Builder.class);
}
// Construct using org.whispersystems.textsecure.internal.push.TextSecureProtos.Content.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getDataMessageFieldBuilder();
getSyncMessageFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
if (dataMessageBuilder_ == null) {
dataMessage_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.getDefaultInstance();
} else {
dataMessageBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (syncMessageBuilder_ == null) {
syncMessage_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.getDefaultInstance();
} else {
syncMessageBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_Content_descriptor;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.Content getDefaultInstanceForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.Content.getDefaultInstance();
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.Content build() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.Content result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.Content buildPartial() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.Content result = new org.whispersystems.textsecure.internal.push.TextSecureProtos.Content(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (dataMessageBuilder_ == null) {
result.dataMessage_ = dataMessage_;
} else {
result.dataMessage_ = dataMessageBuilder_.build();
}
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
if (syncMessageBuilder_ == null) {
result.syncMessage_ = syncMessage_;
} else {
result.syncMessage_ = syncMessageBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.whispersystems.textsecure.internal.push.TextSecureProtos.Content) {
return mergeFrom((org.whispersystems.textsecure.internal.push.TextSecureProtos.Content)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.whispersystems.textsecure.internal.push.TextSecureProtos.Content other) {
if (other == org.whispersystems.textsecure.internal.push.TextSecureProtos.Content.getDefaultInstance()) return this;
if (other.hasDataMessage()) {
mergeDataMessage(other.getDataMessage());
}
if (other.hasSyncMessage()) {
mergeSyncMessage(other.getSyncMessage());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.whispersystems.textsecure.internal.push.TextSecureProtos.Content parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.whispersystems.textsecure.internal.push.TextSecureProtos.Content) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional .textsecure.DataMessage dataMessage = 1;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage dataMessage_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage, org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessageOrBuilder> dataMessageBuilder_;
/**
* optional .textsecure.DataMessage dataMessage = 1;
*/
public boolean hasDataMessage() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .textsecure.DataMessage dataMessage = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage getDataMessage() {
if (dataMessageBuilder_ == null) {
return dataMessage_;
} else {
return dataMessageBuilder_.getMessage();
}
}
/**
* optional .textsecure.DataMessage dataMessage = 1;
*/
public Builder setDataMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage value) {
if (dataMessageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
dataMessage_ = value;
onChanged();
} else {
dataMessageBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
* optional .textsecure.DataMessage dataMessage = 1;
*/
public Builder setDataMessage(
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.Builder builderForValue) {
if (dataMessageBuilder_ == null) {
dataMessage_ = builderForValue.build();
onChanged();
} else {
dataMessageBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
/**
* optional .textsecure.DataMessage dataMessage = 1;
*/
public Builder mergeDataMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage value) {
if (dataMessageBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001) &&
dataMessage_ != org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.getDefaultInstance()) {
dataMessage_ =
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.newBuilder(dataMessage_).mergeFrom(value).buildPartial();
} else {
dataMessage_ = value;
}
onChanged();
} else {
dataMessageBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
* optional .textsecure.DataMessage dataMessage = 1;
*/
public Builder clearDataMessage() {
if (dataMessageBuilder_ == null) {
dataMessage_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.getDefaultInstance();
onChanged();
} else {
dataMessageBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
* optional .textsecure.DataMessage dataMessage = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.Builder getDataMessageBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getDataMessageFieldBuilder().getBuilder();
}
/**
* optional .textsecure.DataMessage dataMessage = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessageOrBuilder getDataMessageOrBuilder() {
if (dataMessageBuilder_ != null) {
return dataMessageBuilder_.getMessageOrBuilder();
} else {
return dataMessage_;
}
}
/**
* optional .textsecure.DataMessage dataMessage = 1;
*/
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage, org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessageOrBuilder>
getDataMessageFieldBuilder() {
if (dataMessageBuilder_ == null) {
dataMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage, org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessageOrBuilder>(
dataMessage_,
getParentForChildren(),
isClean());
dataMessage_ = null;
}
return dataMessageBuilder_;
}
// optional .textsecure.SyncMessage syncMessage = 2;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage syncMessage_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessageOrBuilder> syncMessageBuilder_;
/**
* optional .textsecure.SyncMessage syncMessage = 2;
*/
public boolean hasSyncMessage() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional .textsecure.SyncMessage syncMessage = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage getSyncMessage() {
if (syncMessageBuilder_ == null) {
return syncMessage_;
} else {
return syncMessageBuilder_.getMessage();
}
}
/**
* optional .textsecure.SyncMessage syncMessage = 2;
*/
public Builder setSyncMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage value) {
if (syncMessageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
syncMessage_ = value;
onChanged();
} else {
syncMessageBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
* optional .textsecure.SyncMessage syncMessage = 2;
*/
public Builder setSyncMessage(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Builder builderForValue) {
if (syncMessageBuilder_ == null) {
syncMessage_ = builderForValue.build();
onChanged();
} else {
syncMessageBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
* optional .textsecure.SyncMessage syncMessage = 2;
*/
public Builder mergeSyncMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage value) {
if (syncMessageBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002) &&
syncMessage_ != org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.getDefaultInstance()) {
syncMessage_ =
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.newBuilder(syncMessage_).mergeFrom(value).buildPartial();
} else {
syncMessage_ = value;
}
onChanged();
} else {
syncMessageBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
* optional .textsecure.SyncMessage syncMessage = 2;
*/
public Builder clearSyncMessage() {
if (syncMessageBuilder_ == null) {
syncMessage_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.getDefaultInstance();
onChanged();
} else {
syncMessageBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
* optional .textsecure.SyncMessage syncMessage = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Builder getSyncMessageBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getSyncMessageFieldBuilder().getBuilder();
}
/**
* optional .textsecure.SyncMessage syncMessage = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessageOrBuilder getSyncMessageOrBuilder() {
if (syncMessageBuilder_ != null) {
return syncMessageBuilder_.getMessageOrBuilder();
} else {
return syncMessage_;
}
}
/**
* optional .textsecure.SyncMessage syncMessage = 2;
*/
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessageOrBuilder>
getSyncMessageFieldBuilder() {
if (syncMessageBuilder_ == null) {
syncMessageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessageOrBuilder>(
syncMessage_,
getParentForChildren(),
isClean());
syncMessage_ = null;
}
return syncMessageBuilder_;
}
// @@protoc_insertion_point(builder_scope:textsecure.Content)
}
static {
defaultInstance = new Content(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:textsecure.Content)
}
public interface DataMessageOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional string body = 1;
/**
* optional string body = 1;
*/
boolean hasBody();
/**
* optional string body = 1;
*/
java.lang.String getBody();
/**
* optional string body = 1;
*/
com.google.protobuf.ByteString
getBodyBytes();
// repeated .textsecure.AttachmentPointer attachments = 2;
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
java.util.List
getAttachmentsList();
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer getAttachments(int index);
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
int getAttachmentsCount();
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
java.util.List extends org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder>
getAttachmentsOrBuilderList();
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder getAttachmentsOrBuilder(
int index);
// optional .textsecure.GroupContext group = 3;
/**
* optional .textsecure.GroupContext group = 3;
*/
boolean hasGroup();
/**
* optional .textsecure.GroupContext group = 3;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext getGroup();
/**
* optional .textsecure.GroupContext group = 3;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContextOrBuilder getGroupOrBuilder();
// optional uint32 flags = 4;
/**
* optional uint32 flags = 4;
*/
boolean hasFlags();
/**
* optional uint32 flags = 4;
*/
int getFlags();
}
/**
* Protobuf type {@code textsecure.DataMessage}
*/
public static final class DataMessage extends
com.google.protobuf.GeneratedMessage
implements DataMessageOrBuilder {
// Use DataMessage.newBuilder() to construct.
private DataMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private DataMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final DataMessage defaultInstance;
public static DataMessage getDefaultInstance() {
return defaultInstance;
}
public DataMessage getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DataMessage(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
body_ = input.readBytes();
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
attachments_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
attachments_.add(input.readMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.PARSER, extensionRegistry));
break;
}
case 26: {
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Builder subBuilder = null;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
subBuilder = group_.toBuilder();
}
group_ = input.readMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(group_);
group_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
case 32: {
bitField0_ |= 0x00000004;
flags_ = input.readUInt32();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
attachments_ = java.util.Collections.unmodifiableList(attachments_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_DataMessage_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_DataMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public DataMessage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DataMessage(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
/**
* Protobuf enum {@code textsecure.DataMessage.Flags}
*/
public enum Flags
implements com.google.protobuf.ProtocolMessageEnum {
/**
* END_SESSION = 1;
*/
END_SESSION(0, 1),
;
/**
* END_SESSION = 1;
*/
public static final int END_SESSION_VALUE = 1;
public final int getNumber() { return value; }
public static Flags valueOf(int value) {
switch (value) {
case 1: return END_SESSION;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Flags findValueByNumber(int number) {
return Flags.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.getDescriptor().getEnumTypes().get(0);
}
private static final Flags[] VALUES = values();
public static Flags valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private Flags(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:textsecure.DataMessage.Flags)
}
private int bitField0_;
// optional string body = 1;
public static final int BODY_FIELD_NUMBER = 1;
private java.lang.Object body_;
/**
* optional string body = 1;
*/
public boolean hasBody() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string body = 1;
*/
public java.lang.String getBody() {
java.lang.Object ref = body_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
body_ = s;
}
return s;
}
}
/**
* optional string body = 1;
*/
public com.google.protobuf.ByteString
getBodyBytes() {
java.lang.Object ref = body_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
body_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// repeated .textsecure.AttachmentPointer attachments = 2;
public static final int ATTACHMENTS_FIELD_NUMBER = 2;
private java.util.List attachments_;
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public java.util.List getAttachmentsList() {
return attachments_;
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public java.util.List extends org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder>
getAttachmentsOrBuilderList() {
return attachments_;
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public int getAttachmentsCount() {
return attachments_.size();
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer getAttachments(int index) {
return attachments_.get(index);
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder getAttachmentsOrBuilder(
int index) {
return attachments_.get(index);
}
// optional .textsecure.GroupContext group = 3;
public static final int GROUP_FIELD_NUMBER = 3;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext group_;
/**
* optional .textsecure.GroupContext group = 3;
*/
public boolean hasGroup() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional .textsecure.GroupContext group = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext getGroup() {
return group_;
}
/**
* optional .textsecure.GroupContext group = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContextOrBuilder getGroupOrBuilder() {
return group_;
}
// optional uint32 flags = 4;
public static final int FLAGS_FIELD_NUMBER = 4;
private int flags_;
/**
* optional uint32 flags = 4;
*/
public boolean hasFlags() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional uint32 flags = 4;
*/
public int getFlags() {
return flags_;
}
private void initFields() {
body_ = "";
attachments_ = java.util.Collections.emptyList();
group_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.getDefaultInstance();
flags_ = 0;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, getBodyBytes());
}
for (int i = 0; i < attachments_.size(); i++) {
output.writeMessage(2, attachments_.get(i));
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(3, group_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeUInt32(4, flags_);
}
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, getBodyBytes());
}
for (int i = 0; i < attachments_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, attachments_.get(i));
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, group_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(4, flags_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code textsecure.DataMessage}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_DataMessage_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_DataMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.Builder.class);
}
// Construct using org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getAttachmentsFieldBuilder();
getGroupFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
body_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
if (attachmentsBuilder_ == null) {
attachments_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
attachmentsBuilder_.clear();
}
if (groupBuilder_ == null) {
group_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.getDefaultInstance();
} else {
groupBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
flags_ = 0;
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_DataMessage_descriptor;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage getDefaultInstanceForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.getDefaultInstance();
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage build() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage buildPartial() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage result = new org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.body_ = body_;
if (attachmentsBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
attachments_ = java.util.Collections.unmodifiableList(attachments_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.attachments_ = attachments_;
} else {
result.attachments_ = attachmentsBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000002;
}
if (groupBuilder_ == null) {
result.group_ = group_;
} else {
result.group_ = groupBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000004;
}
result.flags_ = flags_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage) {
return mergeFrom((org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage other) {
if (other == org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.getDefaultInstance()) return this;
if (other.hasBody()) {
bitField0_ |= 0x00000001;
body_ = other.body_;
onChanged();
}
if (attachmentsBuilder_ == null) {
if (!other.attachments_.isEmpty()) {
if (attachments_.isEmpty()) {
attachments_ = other.attachments_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureAttachmentsIsMutable();
attachments_.addAll(other.attachments_);
}
onChanged();
}
} else {
if (!other.attachments_.isEmpty()) {
if (attachmentsBuilder_.isEmpty()) {
attachmentsBuilder_.dispose();
attachmentsBuilder_ = null;
attachments_ = other.attachments_;
bitField0_ = (bitField0_ & ~0x00000002);
attachmentsBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getAttachmentsFieldBuilder() : null;
} else {
attachmentsBuilder_.addAllMessages(other.attachments_);
}
}
}
if (other.hasGroup()) {
mergeGroup(other.getGroup());
}
if (other.hasFlags()) {
setFlags(other.getFlags());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional string body = 1;
private java.lang.Object body_ = "";
/**
* optional string body = 1;
*/
public boolean hasBody() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string body = 1;
*/
public java.lang.String getBody() {
java.lang.Object ref = body_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
body_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string body = 1;
*/
public com.google.protobuf.ByteString
getBodyBytes() {
java.lang.Object ref = body_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
body_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string body = 1;
*/
public Builder setBody(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
body_ = value;
onChanged();
return this;
}
/**
* optional string body = 1;
*/
public Builder clearBody() {
bitField0_ = (bitField0_ & ~0x00000001);
body_ = getDefaultInstance().getBody();
onChanged();
return this;
}
/**
* optional string body = 1;
*/
public Builder setBodyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
body_ = value;
onChanged();
return this;
}
// repeated .textsecure.AttachmentPointer attachments = 2;
private java.util.List attachments_ =
java.util.Collections.emptyList();
private void ensureAttachmentsIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
attachments_ = new java.util.ArrayList(attachments_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder> attachmentsBuilder_;
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public java.util.List getAttachmentsList() {
if (attachmentsBuilder_ == null) {
return java.util.Collections.unmodifiableList(attachments_);
} else {
return attachmentsBuilder_.getMessageList();
}
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public int getAttachmentsCount() {
if (attachmentsBuilder_ == null) {
return attachments_.size();
} else {
return attachmentsBuilder_.getCount();
}
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer getAttachments(int index) {
if (attachmentsBuilder_ == null) {
return attachments_.get(index);
} else {
return attachmentsBuilder_.getMessage(index);
}
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public Builder setAttachments(
int index, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer value) {
if (attachmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAttachmentsIsMutable();
attachments_.set(index, value);
onChanged();
} else {
attachmentsBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public Builder setAttachments(
int index, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder builderForValue) {
if (attachmentsBuilder_ == null) {
ensureAttachmentsIsMutable();
attachments_.set(index, builderForValue.build());
onChanged();
} else {
attachmentsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public Builder addAttachments(org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer value) {
if (attachmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAttachmentsIsMutable();
attachments_.add(value);
onChanged();
} else {
attachmentsBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public Builder addAttachments(
int index, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer value) {
if (attachmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAttachmentsIsMutable();
attachments_.add(index, value);
onChanged();
} else {
attachmentsBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public Builder addAttachments(
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder builderForValue) {
if (attachmentsBuilder_ == null) {
ensureAttachmentsIsMutable();
attachments_.add(builderForValue.build());
onChanged();
} else {
attachmentsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public Builder addAttachments(
int index, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder builderForValue) {
if (attachmentsBuilder_ == null) {
ensureAttachmentsIsMutable();
attachments_.add(index, builderForValue.build());
onChanged();
} else {
attachmentsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public Builder addAllAttachments(
java.lang.Iterable extends org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer> values) {
if (attachmentsBuilder_ == null) {
ensureAttachmentsIsMutable();
super.addAll(values, attachments_);
onChanged();
} else {
attachmentsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public Builder clearAttachments() {
if (attachmentsBuilder_ == null) {
attachments_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
attachmentsBuilder_.clear();
}
return this;
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public Builder removeAttachments(int index) {
if (attachmentsBuilder_ == null) {
ensureAttachmentsIsMutable();
attachments_.remove(index);
onChanged();
} else {
attachmentsBuilder_.remove(index);
}
return this;
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder getAttachmentsBuilder(
int index) {
return getAttachmentsFieldBuilder().getBuilder(index);
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder getAttachmentsOrBuilder(
int index) {
if (attachmentsBuilder_ == null) {
return attachments_.get(index); } else {
return attachmentsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public java.util.List extends org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder>
getAttachmentsOrBuilderList() {
if (attachmentsBuilder_ != null) {
return attachmentsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(attachments_);
}
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder addAttachmentsBuilder() {
return getAttachmentsFieldBuilder().addBuilder(
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance());
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder addAttachmentsBuilder(
int index) {
return getAttachmentsFieldBuilder().addBuilder(
index, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance());
}
/**
* repeated .textsecure.AttachmentPointer attachments = 2;
*/
public java.util.List
getAttachmentsBuilderList() {
return getAttachmentsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder>
getAttachmentsFieldBuilder() {
if (attachmentsBuilder_ == null) {
attachmentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder>(
attachments_,
((bitField0_ & 0x00000002) == 0x00000002),
getParentForChildren(),
isClean());
attachments_ = null;
}
return attachmentsBuilder_;
}
// optional .textsecure.GroupContext group = 3;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext group_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContextOrBuilder> groupBuilder_;
/**
* optional .textsecure.GroupContext group = 3;
*/
public boolean hasGroup() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional .textsecure.GroupContext group = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext getGroup() {
if (groupBuilder_ == null) {
return group_;
} else {
return groupBuilder_.getMessage();
}
}
/**
* optional .textsecure.GroupContext group = 3;
*/
public Builder setGroup(org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext value) {
if (groupBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
group_ = value;
onChanged();
} else {
groupBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .textsecure.GroupContext group = 3;
*/
public Builder setGroup(
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Builder builderForValue) {
if (groupBuilder_ == null) {
group_ = builderForValue.build();
onChanged();
} else {
groupBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .textsecure.GroupContext group = 3;
*/
public Builder mergeGroup(org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext value) {
if (groupBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004) &&
group_ != org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.getDefaultInstance()) {
group_ =
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.newBuilder(group_).mergeFrom(value).buildPartial();
} else {
group_ = value;
}
onChanged();
} else {
groupBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .textsecure.GroupContext group = 3;
*/
public Builder clearGroup() {
if (groupBuilder_ == null) {
group_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.getDefaultInstance();
onChanged();
} else {
groupBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
* optional .textsecure.GroupContext group = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Builder getGroupBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getGroupFieldBuilder().getBuilder();
}
/**
* optional .textsecure.GroupContext group = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContextOrBuilder getGroupOrBuilder() {
if (groupBuilder_ != null) {
return groupBuilder_.getMessageOrBuilder();
} else {
return group_;
}
}
/**
* optional .textsecure.GroupContext group = 3;
*/
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContextOrBuilder>
getGroupFieldBuilder() {
if (groupBuilder_ == null) {
groupBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContextOrBuilder>(
group_,
getParentForChildren(),
isClean());
group_ = null;
}
return groupBuilder_;
}
// optional uint32 flags = 4;
private int flags_ ;
/**
* optional uint32 flags = 4;
*/
public boolean hasFlags() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional uint32 flags = 4;
*/
public int getFlags() {
return flags_;
}
/**
* optional uint32 flags = 4;
*/
public Builder setFlags(int value) {
bitField0_ |= 0x00000008;
flags_ = value;
onChanged();
return this;
}
/**
* optional uint32 flags = 4;
*/
public Builder clearFlags() {
bitField0_ = (bitField0_ & ~0x00000008);
flags_ = 0;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:textsecure.DataMessage)
}
static {
defaultInstance = new DataMessage(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:textsecure.DataMessage)
}
public interface SyncMessageOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional .textsecure.SyncMessage.Sent sent = 1;
/**
* optional .textsecure.SyncMessage.Sent sent = 1;
*/
boolean hasSent();
/**
* optional .textsecure.SyncMessage.Sent sent = 1;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent getSent();
/**
* optional .textsecure.SyncMessage.Sent sent = 1;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.SentOrBuilder getSentOrBuilder();
// optional .textsecure.SyncMessage.Contacts contacts = 2;
/**
* optional .textsecure.SyncMessage.Contacts contacts = 2;
*/
boolean hasContacts();
/**
* optional .textsecure.SyncMessage.Contacts contacts = 2;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts getContacts();
/**
* optional .textsecure.SyncMessage.Contacts contacts = 2;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ContactsOrBuilder getContactsOrBuilder();
// optional .textsecure.SyncMessage.Groups groups = 3;
/**
* optional .textsecure.SyncMessage.Groups groups = 3;
*/
boolean hasGroups();
/**
* optional .textsecure.SyncMessage.Groups groups = 3;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups getGroups();
/**
* optional .textsecure.SyncMessage.Groups groups = 3;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.GroupsOrBuilder getGroupsOrBuilder();
// optional .textsecure.SyncMessage.Request request = 4;
/**
* optional .textsecure.SyncMessage.Request request = 4;
*/
boolean hasRequest();
/**
* optional .textsecure.SyncMessage.Request request = 4;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request getRequest();
/**
* optional .textsecure.SyncMessage.Request request = 4;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.RequestOrBuilder getRequestOrBuilder();
// repeated .textsecure.SyncMessage.Read read = 5;
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
java.util.List
getReadList();
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read getRead(int index);
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
int getReadCount();
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
java.util.List extends org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ReadOrBuilder>
getReadOrBuilderList();
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ReadOrBuilder getReadOrBuilder(
int index);
}
/**
* Protobuf type {@code textsecure.SyncMessage}
*/
public static final class SyncMessage extends
com.google.protobuf.GeneratedMessage
implements SyncMessageOrBuilder {
// Use SyncMessage.newBuilder() to construct.
private SyncMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private SyncMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final SyncMessage defaultInstance;
public static SyncMessage getDefaultInstance() {
return defaultInstance;
}
public SyncMessage getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SyncMessage(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.Builder subBuilder = null;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
subBuilder = sent_.toBuilder();
}
sent_ = input.readMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(sent_);
sent_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break;
}
case 18: {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.Builder subBuilder = null;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
subBuilder = contacts_.toBuilder();
}
contacts_ = input.readMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(contacts_);
contacts_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
case 26: {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = groups_.toBuilder();
}
groups_ = input.readMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(groups_);
groups_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 34: {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = request_.toBuilder();
}
request_ = input.readMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(request_);
request_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
read_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
read_.add(input.readMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.PARSER, extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
read_ = java.util.Collections.unmodifiableList(read_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public SyncMessage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SyncMessage(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public interface SentOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional string destination = 1;
/**
* optional string destination = 1;
*/
boolean hasDestination();
/**
* optional string destination = 1;
*/
java.lang.String getDestination();
/**
* optional string destination = 1;
*/
com.google.protobuf.ByteString
getDestinationBytes();
// optional uint64 timestamp = 2;
/**
* optional uint64 timestamp = 2;
*/
boolean hasTimestamp();
/**
* optional uint64 timestamp = 2;
*/
long getTimestamp();
// optional .textsecure.DataMessage message = 3;
/**
* optional .textsecure.DataMessage message = 3;
*/
boolean hasMessage();
/**
* optional .textsecure.DataMessage message = 3;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage getMessage();
/**
* optional .textsecure.DataMessage message = 3;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessageOrBuilder getMessageOrBuilder();
}
/**
* Protobuf type {@code textsecure.SyncMessage.Sent}
*/
public static final class Sent extends
com.google.protobuf.GeneratedMessage
implements SentOrBuilder {
// Use Sent.newBuilder() to construct.
private Sent(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private Sent(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final Sent defaultInstance;
public static Sent getDefaultInstance() {
return defaultInstance;
}
public Sent getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Sent(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
destination_ = input.readBytes();
break;
}
case 16: {
bitField0_ |= 0x00000002;
timestamp_ = input.readUInt64();
break;
}
case 26: {
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = message_.toBuilder();
}
message_ = input.readMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(message_);
message_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Sent_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Sent_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public Sent parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Sent(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
// optional string destination = 1;
public static final int DESTINATION_FIELD_NUMBER = 1;
private java.lang.Object destination_;
/**
* optional string destination = 1;
*/
public boolean hasDestination() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string destination = 1;
*/
public java.lang.String getDestination() {
java.lang.Object ref = destination_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
destination_ = s;
}
return s;
}
}
/**
* optional string destination = 1;
*/
public com.google.protobuf.ByteString
getDestinationBytes() {
java.lang.Object ref = destination_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
destination_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional uint64 timestamp = 2;
public static final int TIMESTAMP_FIELD_NUMBER = 2;
private long timestamp_;
/**
* optional uint64 timestamp = 2;
*/
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional uint64 timestamp = 2;
*/
public long getTimestamp() {
return timestamp_;
}
// optional .textsecure.DataMessage message = 3;
public static final int MESSAGE_FIELD_NUMBER = 3;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage message_;
/**
* optional .textsecure.DataMessage message = 3;
*/
public boolean hasMessage() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional .textsecure.DataMessage message = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage getMessage() {
return message_;
}
/**
* optional .textsecure.DataMessage message = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessageOrBuilder getMessageOrBuilder() {
return message_;
}
private void initFields() {
destination_ = "";
timestamp_ = 0L;
message_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, getDestinationBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeUInt64(2, timestamp_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, message_);
}
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, getDestinationBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, timestamp_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, message_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code textsecure.SyncMessage.Sent}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.SentOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Sent_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Sent_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.Builder.class);
}
// Construct using org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getMessageFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
destination_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
timestamp_ = 0L;
bitField0_ = (bitField0_ & ~0x00000002);
if (messageBuilder_ == null) {
message_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.getDefaultInstance();
} else {
messageBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Sent_descriptor;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent getDefaultInstanceForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.getDefaultInstance();
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent build() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent buildPartial() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent result = new org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.destination_ = destination_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.timestamp_ = timestamp_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (messageBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = messageBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent) {
return mergeFrom((org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent other) {
if (other == org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.getDefaultInstance()) return this;
if (other.hasDestination()) {
bitField0_ |= 0x00000001;
destination_ = other.destination_;
onChanged();
}
if (other.hasTimestamp()) {
setTimestamp(other.getTimestamp());
}
if (other.hasMessage()) {
mergeMessage(other.getMessage());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional string destination = 1;
private java.lang.Object destination_ = "";
/**
* optional string destination = 1;
*/
public boolean hasDestination() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string destination = 1;
*/
public java.lang.String getDestination() {
java.lang.Object ref = destination_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
destination_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string destination = 1;
*/
public com.google.protobuf.ByteString
getDestinationBytes() {
java.lang.Object ref = destination_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
destination_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string destination = 1;
*/
public Builder setDestination(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
destination_ = value;
onChanged();
return this;
}
/**
* optional string destination = 1;
*/
public Builder clearDestination() {
bitField0_ = (bitField0_ & ~0x00000001);
destination_ = getDefaultInstance().getDestination();
onChanged();
return this;
}
/**
* optional string destination = 1;
*/
public Builder setDestinationBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
destination_ = value;
onChanged();
return this;
}
// optional uint64 timestamp = 2;
private long timestamp_ ;
/**
* optional uint64 timestamp = 2;
*/
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional uint64 timestamp = 2;
*/
public long getTimestamp() {
return timestamp_;
}
/**
* optional uint64 timestamp = 2;
*/
public Builder setTimestamp(long value) {
bitField0_ |= 0x00000002;
timestamp_ = value;
onChanged();
return this;
}
/**
* optional uint64 timestamp = 2;
*/
public Builder clearTimestamp() {
bitField0_ = (bitField0_ & ~0x00000002);
timestamp_ = 0L;
onChanged();
return this;
}
// optional .textsecure.DataMessage message = 3;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage message_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage, org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessageOrBuilder> messageBuilder_;
/**
* optional .textsecure.DataMessage message = 3;
*/
public boolean hasMessage() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional .textsecure.DataMessage message = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage getMessage() {
if (messageBuilder_ == null) {
return message_;
} else {
return messageBuilder_.getMessage();
}
}
/**
* optional .textsecure.DataMessage message = 3;
*/
public Builder setMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage value) {
if (messageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
messageBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .textsecure.DataMessage message = 3;
*/
public Builder setMessage(
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.Builder builderForValue) {
if (messageBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
messageBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .textsecure.DataMessage message = 3;
*/
public Builder mergeMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage value) {
if (messageBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004) &&
message_ != org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.getDefaultInstance()) {
message_ =
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.newBuilder(message_).mergeFrom(value).buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
messageBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .textsecure.DataMessage message = 3;
*/
public Builder clearMessage() {
if (messageBuilder_ == null) {
message_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.getDefaultInstance();
onChanged();
} else {
messageBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
* optional .textsecure.DataMessage message = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.Builder getMessageBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getMessageFieldBuilder().getBuilder();
}
/**
* optional .textsecure.DataMessage message = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessageOrBuilder getMessageOrBuilder() {
if (messageBuilder_ != null) {
return messageBuilder_.getMessageOrBuilder();
} else {
return message_;
}
}
/**
* optional .textsecure.DataMessage message = 3;
*/
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage, org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessageOrBuilder>
getMessageFieldBuilder() {
if (messageBuilder_ == null) {
messageBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage, org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessage.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.DataMessageOrBuilder>(
message_,
getParentForChildren(),
isClean());
message_ = null;
}
return messageBuilder_;
}
// @@protoc_insertion_point(builder_scope:textsecure.SyncMessage.Sent)
}
static {
defaultInstance = new Sent(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:textsecure.SyncMessage.Sent)
}
public interface ContactsOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional .textsecure.AttachmentPointer blob = 1;
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
boolean hasBlob();
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer getBlob();
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder getBlobOrBuilder();
}
/**
* Protobuf type {@code textsecure.SyncMessage.Contacts}
*/
public static final class Contacts extends
com.google.protobuf.GeneratedMessage
implements ContactsOrBuilder {
// Use Contacts.newBuilder() to construct.
private Contacts(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private Contacts(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final Contacts defaultInstance;
public static Contacts getDefaultInstance() {
return defaultInstance;
}
public Contacts getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Contacts(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder subBuilder = null;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
subBuilder = blob_.toBuilder();
}
blob_ = input.readMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(blob_);
blob_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Contacts_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Contacts_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public Contacts parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Contacts(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
// optional .textsecure.AttachmentPointer blob = 1;
public static final int BLOB_FIELD_NUMBER = 1;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer blob_;
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public boolean hasBlob() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer getBlob() {
return blob_;
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder getBlobOrBuilder() {
return blob_;
}
private void initFields() {
blob_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(1, blob_);
}
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, blob_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code textsecure.SyncMessage.Contacts}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ContactsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Contacts_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Contacts_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.Builder.class);
}
// Construct using org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getBlobFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
if (blobBuilder_ == null) {
blob_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance();
} else {
blobBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Contacts_descriptor;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts getDefaultInstanceForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.getDefaultInstance();
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts build() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts buildPartial() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts result = new org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (blobBuilder_ == null) {
result.blob_ = blob_;
} else {
result.blob_ = blobBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts) {
return mergeFrom((org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts other) {
if (other == org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.getDefaultInstance()) return this;
if (other.hasBlob()) {
mergeBlob(other.getBlob());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional .textsecure.AttachmentPointer blob = 1;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer blob_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder> blobBuilder_;
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public boolean hasBlob() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer getBlob() {
if (blobBuilder_ == null) {
return blob_;
} else {
return blobBuilder_.getMessage();
}
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public Builder setBlob(org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer value) {
if (blobBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
blob_ = value;
onChanged();
} else {
blobBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public Builder setBlob(
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder builderForValue) {
if (blobBuilder_ == null) {
blob_ = builderForValue.build();
onChanged();
} else {
blobBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public Builder mergeBlob(org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer value) {
if (blobBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001) &&
blob_ != org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance()) {
blob_ =
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.newBuilder(blob_).mergeFrom(value).buildPartial();
} else {
blob_ = value;
}
onChanged();
} else {
blobBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public Builder clearBlob() {
if (blobBuilder_ == null) {
blob_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance();
onChanged();
} else {
blobBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder getBlobBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getBlobFieldBuilder().getBuilder();
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder getBlobOrBuilder() {
if (blobBuilder_ != null) {
return blobBuilder_.getMessageOrBuilder();
} else {
return blob_;
}
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder>
getBlobFieldBuilder() {
if (blobBuilder_ == null) {
blobBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder>(
blob_,
getParentForChildren(),
isClean());
blob_ = null;
}
return blobBuilder_;
}
// @@protoc_insertion_point(builder_scope:textsecure.SyncMessage.Contacts)
}
static {
defaultInstance = new Contacts(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:textsecure.SyncMessage.Contacts)
}
public interface GroupsOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional .textsecure.AttachmentPointer blob = 1;
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
boolean hasBlob();
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer getBlob();
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder getBlobOrBuilder();
}
/**
* Protobuf type {@code textsecure.SyncMessage.Groups}
*/
public static final class Groups extends
com.google.protobuf.GeneratedMessage
implements GroupsOrBuilder {
// Use Groups.newBuilder() to construct.
private Groups(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private Groups(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final Groups defaultInstance;
public static Groups getDefaultInstance() {
return defaultInstance;
}
public Groups getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Groups(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder subBuilder = null;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
subBuilder = blob_.toBuilder();
}
blob_ = input.readMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(blob_);
blob_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Groups_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Groups_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public Groups parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Groups(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
// optional .textsecure.AttachmentPointer blob = 1;
public static final int BLOB_FIELD_NUMBER = 1;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer blob_;
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public boolean hasBlob() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer getBlob() {
return blob_;
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder getBlobOrBuilder() {
return blob_;
}
private void initFields() {
blob_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(1, blob_);
}
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, blob_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code textsecure.SyncMessage.Groups}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.GroupsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Groups_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Groups_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.Builder.class);
}
// Construct using org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getBlobFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
if (blobBuilder_ == null) {
blob_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance();
} else {
blobBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Groups_descriptor;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups getDefaultInstanceForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.getDefaultInstance();
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups build() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups buildPartial() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups result = new org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (blobBuilder_ == null) {
result.blob_ = blob_;
} else {
result.blob_ = blobBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups) {
return mergeFrom((org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups other) {
if (other == org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.getDefaultInstance()) return this;
if (other.hasBlob()) {
mergeBlob(other.getBlob());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional .textsecure.AttachmentPointer blob = 1;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer blob_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder> blobBuilder_;
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public boolean hasBlob() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer getBlob() {
if (blobBuilder_ == null) {
return blob_;
} else {
return blobBuilder_.getMessage();
}
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public Builder setBlob(org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer value) {
if (blobBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
blob_ = value;
onChanged();
} else {
blobBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public Builder setBlob(
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder builderForValue) {
if (blobBuilder_ == null) {
blob_ = builderForValue.build();
onChanged();
} else {
blobBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public Builder mergeBlob(org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer value) {
if (blobBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001) &&
blob_ != org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance()) {
blob_ =
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.newBuilder(blob_).mergeFrom(value).buildPartial();
} else {
blob_ = value;
}
onChanged();
} else {
blobBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public Builder clearBlob() {
if (blobBuilder_ == null) {
blob_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance();
onChanged();
} else {
blobBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder getBlobBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getBlobFieldBuilder().getBuilder();
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder getBlobOrBuilder() {
if (blobBuilder_ != null) {
return blobBuilder_.getMessageOrBuilder();
} else {
return blob_;
}
}
/**
* optional .textsecure.AttachmentPointer blob = 1;
*/
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder>
getBlobFieldBuilder() {
if (blobBuilder_ == null) {
blobBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder>(
blob_,
getParentForChildren(),
isClean());
blob_ = null;
}
return blobBuilder_;
}
// @@protoc_insertion_point(builder_scope:textsecure.SyncMessage.Groups)
}
static {
defaultInstance = new Groups(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:textsecure.SyncMessage.Groups)
}
public interface RequestOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional .textsecure.SyncMessage.Request.Type type = 1;
/**
* optional .textsecure.SyncMessage.Request.Type type = 1;
*/
boolean hasType();
/**
* optional .textsecure.SyncMessage.Request.Type type = 1;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Type getType();
}
/**
* Protobuf type {@code textsecure.SyncMessage.Request}
*/
public static final class Request extends
com.google.protobuf.GeneratedMessage
implements RequestOrBuilder {
// Use Request.newBuilder() to construct.
private Request(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private Request(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final Request defaultInstance;
public static Request getDefaultInstance() {
return defaultInstance;
}
public Request getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Request(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Type value = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Type.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(1, rawValue);
} else {
bitField0_ |= 0x00000001;
type_ = value;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Request_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Request_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public Request parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Request(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
/**
* Protobuf enum {@code textsecure.SyncMessage.Request.Type}
*/
public enum Type
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN = 0;
*/
UNKNOWN(0, 0),
/**
* CONTACTS = 1;
*/
CONTACTS(1, 1),
/**
* GROUPS = 2;
*/
GROUPS(2, 2),
;
/**
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
/**
* CONTACTS = 1;
*/
public static final int CONTACTS_VALUE = 1;
/**
* GROUPS = 2;
*/
public static final int GROUPS_VALUE = 2;
public final int getNumber() { return value; }
public static Type valueOf(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return CONTACTS;
case 2: return GROUPS;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Type findValueByNumber(int number) {
return Type.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.getDescriptor().getEnumTypes().get(0);
}
private static final Type[] VALUES = values();
public static Type valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private Type(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:textsecure.SyncMessage.Request.Type)
}
private int bitField0_;
// optional .textsecure.SyncMessage.Request.Type type = 1;
public static final int TYPE_FIELD_NUMBER = 1;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Type type_;
/**
* optional .textsecure.SyncMessage.Request.Type type = 1;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .textsecure.SyncMessage.Request.Type type = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Type getType() {
return type_;
}
private void initFields() {
type_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Type.UNKNOWN;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeEnum(1, type_.getNumber());
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, type_.getNumber());
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code textsecure.SyncMessage.Request}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.RequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Request_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Request_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Builder.class);
}
// Construct using org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
type_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Type.UNKNOWN;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Request_descriptor;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request getDefaultInstanceForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.getDefaultInstance();
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request build() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request buildPartial() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request result = new org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.type_ = type_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request) {
return mergeFrom((org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request other) {
if (other == org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.getDefaultInstance()) return this;
if (other.hasType()) {
setType(other.getType());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional .textsecure.SyncMessage.Request.Type type = 1;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Type type_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Type.UNKNOWN;
/**
* optional .textsecure.SyncMessage.Request.Type type = 1;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .textsecure.SyncMessage.Request.Type type = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Type getType() {
return type_;
}
/**
* optional .textsecure.SyncMessage.Request.Type type = 1;
*/
public Builder setType(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Type value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
type_ = value;
onChanged();
return this;
}
/**
* optional .textsecure.SyncMessage.Request.Type type = 1;
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000001);
type_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Type.UNKNOWN;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:textsecure.SyncMessage.Request)
}
static {
defaultInstance = new Request(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:textsecure.SyncMessage.Request)
}
public interface ReadOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional string sender = 1;
/**
* optional string sender = 1;
*/
boolean hasSender();
/**
* optional string sender = 1;
*/
java.lang.String getSender();
/**
* optional string sender = 1;
*/
com.google.protobuf.ByteString
getSenderBytes();
// optional uint64 timestamp = 2;
/**
* optional uint64 timestamp = 2;
*/
boolean hasTimestamp();
/**
* optional uint64 timestamp = 2;
*/
long getTimestamp();
}
/**
* Protobuf type {@code textsecure.SyncMessage.Read}
*/
public static final class Read extends
com.google.protobuf.GeneratedMessage
implements ReadOrBuilder {
// Use Read.newBuilder() to construct.
private Read(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private Read(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final Read defaultInstance;
public static Read getDefaultInstance() {
return defaultInstance;
}
public Read getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Read(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
sender_ = input.readBytes();
break;
}
case 16: {
bitField0_ |= 0x00000002;
timestamp_ = input.readUInt64();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Read_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Read_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public Read parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Read(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
// optional string sender = 1;
public static final int SENDER_FIELD_NUMBER = 1;
private java.lang.Object sender_;
/**
* optional string sender = 1;
*/
public boolean hasSender() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string sender = 1;
*/
public java.lang.String getSender() {
java.lang.Object ref = sender_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
sender_ = s;
}
return s;
}
}
/**
* optional string sender = 1;
*/
public com.google.protobuf.ByteString
getSenderBytes() {
java.lang.Object ref = sender_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sender_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional uint64 timestamp = 2;
public static final int TIMESTAMP_FIELD_NUMBER = 2;
private long timestamp_;
/**
* optional uint64 timestamp = 2;
*/
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional uint64 timestamp = 2;
*/
public long getTimestamp() {
return timestamp_;
}
private void initFields() {
sender_ = "";
timestamp_ = 0L;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, getSenderBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeUInt64(2, timestamp_);
}
getUnknownFields().writeTo(output);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, getSenderBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, timestamp_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code textsecure.SyncMessage.Read}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ReadOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Read_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Read_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.Builder.class);
}
// Construct using org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
sender_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
timestamp_ = 0L;
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_Read_descriptor;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read getDefaultInstanceForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.getDefaultInstance();
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read build() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read buildPartial() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read result = new org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.sender_ = sender_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.timestamp_ = timestamp_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read) {
return mergeFrom((org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read other) {
if (other == org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.getDefaultInstance()) return this;
if (other.hasSender()) {
bitField0_ |= 0x00000001;
sender_ = other.sender_;
onChanged();
}
if (other.hasTimestamp()) {
setTimestamp(other.getTimestamp());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional string sender = 1;
private java.lang.Object sender_ = "";
/**
* optional string sender = 1;
*/
public boolean hasSender() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string sender = 1;
*/
public java.lang.String getSender() {
java.lang.Object ref = sender_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
sender_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string sender = 1;
*/
public com.google.protobuf.ByteString
getSenderBytes() {
java.lang.Object ref = sender_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sender_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string sender = 1;
*/
public Builder setSender(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
sender_ = value;
onChanged();
return this;
}
/**
* optional string sender = 1;
*/
public Builder clearSender() {
bitField0_ = (bitField0_ & ~0x00000001);
sender_ = getDefaultInstance().getSender();
onChanged();
return this;
}
/**
* optional string sender = 1;
*/
public Builder setSenderBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
sender_ = value;
onChanged();
return this;
}
// optional uint64 timestamp = 2;
private long timestamp_ ;
/**
* optional uint64 timestamp = 2;
*/
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional uint64 timestamp = 2;
*/
public long getTimestamp() {
return timestamp_;
}
/**
* optional uint64 timestamp = 2;
*/
public Builder setTimestamp(long value) {
bitField0_ |= 0x00000002;
timestamp_ = value;
onChanged();
return this;
}
/**
* optional uint64 timestamp = 2;
*/
public Builder clearTimestamp() {
bitField0_ = (bitField0_ & ~0x00000002);
timestamp_ = 0L;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:textsecure.SyncMessage.Read)
}
static {
defaultInstance = new Read(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:textsecure.SyncMessage.Read)
}
private int bitField0_;
// optional .textsecure.SyncMessage.Sent sent = 1;
public static final int SENT_FIELD_NUMBER = 1;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent sent_;
/**
* optional .textsecure.SyncMessage.Sent sent = 1;
*/
public boolean hasSent() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .textsecure.SyncMessage.Sent sent = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent getSent() {
return sent_;
}
/**
* optional .textsecure.SyncMessage.Sent sent = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.SentOrBuilder getSentOrBuilder() {
return sent_;
}
// optional .textsecure.SyncMessage.Contacts contacts = 2;
public static final int CONTACTS_FIELD_NUMBER = 2;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts contacts_;
/**
* optional .textsecure.SyncMessage.Contacts contacts = 2;
*/
public boolean hasContacts() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional .textsecure.SyncMessage.Contacts contacts = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts getContacts() {
return contacts_;
}
/**
* optional .textsecure.SyncMessage.Contacts contacts = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ContactsOrBuilder getContactsOrBuilder() {
return contacts_;
}
// optional .textsecure.SyncMessage.Groups groups = 3;
public static final int GROUPS_FIELD_NUMBER = 3;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups groups_;
/**
* optional .textsecure.SyncMessage.Groups groups = 3;
*/
public boolean hasGroups() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional .textsecure.SyncMessage.Groups groups = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups getGroups() {
return groups_;
}
/**
* optional .textsecure.SyncMessage.Groups groups = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.GroupsOrBuilder getGroupsOrBuilder() {
return groups_;
}
// optional .textsecure.SyncMessage.Request request = 4;
public static final int REQUEST_FIELD_NUMBER = 4;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request request_;
/**
* optional .textsecure.SyncMessage.Request request = 4;
*/
public boolean hasRequest() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional .textsecure.SyncMessage.Request request = 4;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request getRequest() {
return request_;
}
/**
* optional .textsecure.SyncMessage.Request request = 4;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.RequestOrBuilder getRequestOrBuilder() {
return request_;
}
// repeated .textsecure.SyncMessage.Read read = 5;
public static final int READ_FIELD_NUMBER = 5;
private java.util.List read_;
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public java.util.List getReadList() {
return read_;
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public java.util.List extends org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ReadOrBuilder>
getReadOrBuilderList() {
return read_;
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public int getReadCount() {
return read_.size();
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read getRead(int index) {
return read_.get(index);
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ReadOrBuilder getReadOrBuilder(
int index) {
return read_.get(index);
}
private void initFields() {
sent_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.getDefaultInstance();
contacts_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.getDefaultInstance();
groups_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.getDefaultInstance();
request_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.getDefaultInstance();
read_ = 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, sent_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(2, contacts_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, groups_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(4, request_);
}
for (int i = 0; i < read_.size(); i++) {
output.writeMessage(5, read_.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, sent_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, contacts_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, groups_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, request_);
}
for (int i = 0; i < read_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, read_.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.internal.push.TextSecureProtos.SyncMessage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code textsecure.SyncMessage}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Builder.class);
}
// Construct using org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getSentFieldBuilder();
getContactsFieldBuilder();
getGroupsFieldBuilder();
getRequestFieldBuilder();
getReadFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
if (sentBuilder_ == null) {
sent_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.getDefaultInstance();
} else {
sentBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
if (contactsBuilder_ == null) {
contacts_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.getDefaultInstance();
} else {
contactsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
if (groupsBuilder_ == null) {
groups_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.getDefaultInstance();
} else {
groupsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
if (requestBuilder_ == null) {
request_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.getDefaultInstance();
} else {
requestBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
if (readBuilder_ == null) {
read_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
} else {
readBuilder_.clear();
}
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_SyncMessage_descriptor;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage getDefaultInstanceForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.getDefaultInstance();
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage build() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage buildPartial() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage result = new org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
if (sentBuilder_ == null) {
result.sent_ = sent_;
} else {
result.sent_ = sentBuilder_.build();
}
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
if (contactsBuilder_ == null) {
result.contacts_ = contacts_;
} else {
result.contacts_ = contactsBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (groupsBuilder_ == null) {
result.groups_ = groups_;
} else {
result.groups_ = groupsBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
if (requestBuilder_ == null) {
result.request_ = request_;
} else {
result.request_ = requestBuilder_.build();
}
if (readBuilder_ == null) {
if (((bitField0_ & 0x00000010) == 0x00000010)) {
read_ = java.util.Collections.unmodifiableList(read_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.read_ = read_;
} else {
result.read_ = readBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage) {
return mergeFrom((org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage other) {
if (other == org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.getDefaultInstance()) return this;
if (other.hasSent()) {
mergeSent(other.getSent());
}
if (other.hasContacts()) {
mergeContacts(other.getContacts());
}
if (other.hasGroups()) {
mergeGroups(other.getGroups());
}
if (other.hasRequest()) {
mergeRequest(other.getRequest());
}
if (readBuilder_ == null) {
if (!other.read_.isEmpty()) {
if (read_.isEmpty()) {
read_ = other.read_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureReadIsMutable();
read_.addAll(other.read_);
}
onChanged();
}
} else {
if (!other.read_.isEmpty()) {
if (readBuilder_.isEmpty()) {
readBuilder_.dispose();
readBuilder_ = null;
read_ = other.read_;
bitField0_ = (bitField0_ & ~0x00000010);
readBuilder_ =
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
getReadFieldBuilder() : null;
} else {
readBuilder_.addAllMessages(other.read_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional .textsecure.SyncMessage.Sent sent = 1;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent sent_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.SentOrBuilder> sentBuilder_;
/**
* optional .textsecure.SyncMessage.Sent sent = 1;
*/
public boolean hasSent() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .textsecure.SyncMessage.Sent sent = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent getSent() {
if (sentBuilder_ == null) {
return sent_;
} else {
return sentBuilder_.getMessage();
}
}
/**
* optional .textsecure.SyncMessage.Sent sent = 1;
*/
public Builder setSent(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent value) {
if (sentBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
sent_ = value;
onChanged();
} else {
sentBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
* optional .textsecure.SyncMessage.Sent sent = 1;
*/
public Builder setSent(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.Builder builderForValue) {
if (sentBuilder_ == null) {
sent_ = builderForValue.build();
onChanged();
} else {
sentBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
return this;
}
/**
* optional .textsecure.SyncMessage.Sent sent = 1;
*/
public Builder mergeSent(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent value) {
if (sentBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001) &&
sent_ != org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.getDefaultInstance()) {
sent_ =
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.newBuilder(sent_).mergeFrom(value).buildPartial();
} else {
sent_ = value;
}
onChanged();
} else {
sentBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
return this;
}
/**
* optional .textsecure.SyncMessage.Sent sent = 1;
*/
public Builder clearSent() {
if (sentBuilder_ == null) {
sent_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.getDefaultInstance();
onChanged();
} else {
sentBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
* optional .textsecure.SyncMessage.Sent sent = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.Builder getSentBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getSentFieldBuilder().getBuilder();
}
/**
* optional .textsecure.SyncMessage.Sent sent = 1;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.SentOrBuilder getSentOrBuilder() {
if (sentBuilder_ != null) {
return sentBuilder_.getMessageOrBuilder();
} else {
return sent_;
}
}
/**
* optional .textsecure.SyncMessage.Sent sent = 1;
*/
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.SentOrBuilder>
getSentFieldBuilder() {
if (sentBuilder_ == null) {
sentBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Sent.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.SentOrBuilder>(
sent_,
getParentForChildren(),
isClean());
sent_ = null;
}
return sentBuilder_;
}
// optional .textsecure.SyncMessage.Contacts contacts = 2;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts contacts_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ContactsOrBuilder> contactsBuilder_;
/**
* optional .textsecure.SyncMessage.Contacts contacts = 2;
*/
public boolean hasContacts() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional .textsecure.SyncMessage.Contacts contacts = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts getContacts() {
if (contactsBuilder_ == null) {
return contacts_;
} else {
return contactsBuilder_.getMessage();
}
}
/**
* optional .textsecure.SyncMessage.Contacts contacts = 2;
*/
public Builder setContacts(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts value) {
if (contactsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
contacts_ = value;
onChanged();
} else {
contactsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
* optional .textsecure.SyncMessage.Contacts contacts = 2;
*/
public Builder setContacts(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.Builder builderForValue) {
if (contactsBuilder_ == null) {
contacts_ = builderForValue.build();
onChanged();
} else {
contactsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
* optional .textsecure.SyncMessage.Contacts contacts = 2;
*/
public Builder mergeContacts(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts value) {
if (contactsBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002) &&
contacts_ != org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.getDefaultInstance()) {
contacts_ =
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.newBuilder(contacts_).mergeFrom(value).buildPartial();
} else {
contacts_ = value;
}
onChanged();
} else {
contactsBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
* optional .textsecure.SyncMessage.Contacts contacts = 2;
*/
public Builder clearContacts() {
if (contactsBuilder_ == null) {
contacts_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.getDefaultInstance();
onChanged();
} else {
contactsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
* optional .textsecure.SyncMessage.Contacts contacts = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.Builder getContactsBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getContactsFieldBuilder().getBuilder();
}
/**
* optional .textsecure.SyncMessage.Contacts contacts = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ContactsOrBuilder getContactsOrBuilder() {
if (contactsBuilder_ != null) {
return contactsBuilder_.getMessageOrBuilder();
} else {
return contacts_;
}
}
/**
* optional .textsecure.SyncMessage.Contacts contacts = 2;
*/
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ContactsOrBuilder>
getContactsFieldBuilder() {
if (contactsBuilder_ == null) {
contactsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Contacts.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ContactsOrBuilder>(
contacts_,
getParentForChildren(),
isClean());
contacts_ = null;
}
return contactsBuilder_;
}
// optional .textsecure.SyncMessage.Groups groups = 3;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups groups_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.GroupsOrBuilder> groupsBuilder_;
/**
* optional .textsecure.SyncMessage.Groups groups = 3;
*/
public boolean hasGroups() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional .textsecure.SyncMessage.Groups groups = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups getGroups() {
if (groupsBuilder_ == null) {
return groups_;
} else {
return groupsBuilder_.getMessage();
}
}
/**
* optional .textsecure.SyncMessage.Groups groups = 3;
*/
public Builder setGroups(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups value) {
if (groupsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
groups_ = value;
onChanged();
} else {
groupsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .textsecure.SyncMessage.Groups groups = 3;
*/
public Builder setGroups(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.Builder builderForValue) {
if (groupsBuilder_ == null) {
groups_ = builderForValue.build();
onChanged();
} else {
groupsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .textsecure.SyncMessage.Groups groups = 3;
*/
public Builder mergeGroups(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups value) {
if (groupsBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004) &&
groups_ != org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.getDefaultInstance()) {
groups_ =
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.newBuilder(groups_).mergeFrom(value).buildPartial();
} else {
groups_ = value;
}
onChanged();
} else {
groupsBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .textsecure.SyncMessage.Groups groups = 3;
*/
public Builder clearGroups() {
if (groupsBuilder_ == null) {
groups_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.getDefaultInstance();
onChanged();
} else {
groupsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
* optional .textsecure.SyncMessage.Groups groups = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.Builder getGroupsBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getGroupsFieldBuilder().getBuilder();
}
/**
* optional .textsecure.SyncMessage.Groups groups = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.GroupsOrBuilder getGroupsOrBuilder() {
if (groupsBuilder_ != null) {
return groupsBuilder_.getMessageOrBuilder();
} else {
return groups_;
}
}
/**
* optional .textsecure.SyncMessage.Groups groups = 3;
*/
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.GroupsOrBuilder>
getGroupsFieldBuilder() {
if (groupsBuilder_ == null) {
groupsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Groups.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.GroupsOrBuilder>(
groups_,
getParentForChildren(),
isClean());
groups_ = null;
}
return groupsBuilder_;
}
// optional .textsecure.SyncMessage.Request request = 4;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request request_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.RequestOrBuilder> requestBuilder_;
/**
* optional .textsecure.SyncMessage.Request request = 4;
*/
public boolean hasRequest() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional .textsecure.SyncMessage.Request request = 4;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request getRequest() {
if (requestBuilder_ == null) {
return request_;
} else {
return requestBuilder_.getMessage();
}
}
/**
* optional .textsecure.SyncMessage.Request request = 4;
*/
public Builder setRequest(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request value) {
if (requestBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
request_ = value;
onChanged();
} else {
requestBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .textsecure.SyncMessage.Request request = 4;
*/
public Builder setRequest(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Builder builderForValue) {
if (requestBuilder_ == null) {
request_ = builderForValue.build();
onChanged();
} else {
requestBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .textsecure.SyncMessage.Request request = 4;
*/
public Builder mergeRequest(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request value) {
if (requestBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008) &&
request_ != org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.getDefaultInstance()) {
request_ =
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.newBuilder(request_).mergeFrom(value).buildPartial();
} else {
request_ = value;
}
onChanged();
} else {
requestBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .textsecure.SyncMessage.Request request = 4;
*/
public Builder clearRequest() {
if (requestBuilder_ == null) {
request_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.getDefaultInstance();
onChanged();
} else {
requestBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
* optional .textsecure.SyncMessage.Request request = 4;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Builder getRequestBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getRequestFieldBuilder().getBuilder();
}
/**
* optional .textsecure.SyncMessage.Request request = 4;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.RequestOrBuilder getRequestOrBuilder() {
if (requestBuilder_ != null) {
return requestBuilder_.getMessageOrBuilder();
} else {
return request_;
}
}
/**
* optional .textsecure.SyncMessage.Request request = 4;
*/
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.RequestOrBuilder>
getRequestFieldBuilder() {
if (requestBuilder_ == null) {
requestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Request.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.RequestOrBuilder>(
request_,
getParentForChildren(),
isClean());
request_ = null;
}
return requestBuilder_;
}
// repeated .textsecure.SyncMessage.Read read = 5;
private java.util.List read_ =
java.util.Collections.emptyList();
private void ensureReadIsMutable() {
if (!((bitField0_ & 0x00000010) == 0x00000010)) {
read_ = new java.util.ArrayList(read_);
bitField0_ |= 0x00000010;
}
}
private com.google.protobuf.RepeatedFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ReadOrBuilder> readBuilder_;
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public java.util.List getReadList() {
if (readBuilder_ == null) {
return java.util.Collections.unmodifiableList(read_);
} else {
return readBuilder_.getMessageList();
}
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public int getReadCount() {
if (readBuilder_ == null) {
return read_.size();
} else {
return readBuilder_.getCount();
}
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read getRead(int index) {
if (readBuilder_ == null) {
return read_.get(index);
} else {
return readBuilder_.getMessage(index);
}
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public Builder setRead(
int index, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read value) {
if (readBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureReadIsMutable();
read_.set(index, value);
onChanged();
} else {
readBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public Builder setRead(
int index, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.Builder builderForValue) {
if (readBuilder_ == null) {
ensureReadIsMutable();
read_.set(index, builderForValue.build());
onChanged();
} else {
readBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public Builder addRead(org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read value) {
if (readBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureReadIsMutable();
read_.add(value);
onChanged();
} else {
readBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public Builder addRead(
int index, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read value) {
if (readBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureReadIsMutable();
read_.add(index, value);
onChanged();
} else {
readBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public Builder addRead(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.Builder builderForValue) {
if (readBuilder_ == null) {
ensureReadIsMutable();
read_.add(builderForValue.build());
onChanged();
} else {
readBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public Builder addRead(
int index, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.Builder builderForValue) {
if (readBuilder_ == null) {
ensureReadIsMutable();
read_.add(index, builderForValue.build());
onChanged();
} else {
readBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public Builder addAllRead(
java.lang.Iterable extends org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read> values) {
if (readBuilder_ == null) {
ensureReadIsMutable();
super.addAll(values, read_);
onChanged();
} else {
readBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public Builder clearRead() {
if (readBuilder_ == null) {
read_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
} else {
readBuilder_.clear();
}
return this;
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public Builder removeRead(int index) {
if (readBuilder_ == null) {
ensureReadIsMutable();
read_.remove(index);
onChanged();
} else {
readBuilder_.remove(index);
}
return this;
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.Builder getReadBuilder(
int index) {
return getReadFieldBuilder().getBuilder(index);
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ReadOrBuilder getReadOrBuilder(
int index) {
if (readBuilder_ == null) {
return read_.get(index); } else {
return readBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public java.util.List extends org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ReadOrBuilder>
getReadOrBuilderList() {
if (readBuilder_ != null) {
return readBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(read_);
}
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.Builder addReadBuilder() {
return getReadFieldBuilder().addBuilder(
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.getDefaultInstance());
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.Builder addReadBuilder(
int index) {
return getReadFieldBuilder().addBuilder(
index, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.getDefaultInstance());
}
/**
* repeated .textsecure.SyncMessage.Read read = 5;
*/
public java.util.List
getReadBuilderList() {
return getReadFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ReadOrBuilder>
getReadFieldBuilder() {
if (readBuilder_ == null) {
readBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.Read.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.SyncMessage.ReadOrBuilder>(
read_,
((bitField0_ & 0x00000010) == 0x00000010),
getParentForChildren(),
isClean());
read_ = null;
}
return readBuilder_;
}
// @@protoc_insertion_point(builder_scope:textsecure.SyncMessage)
}
static {
defaultInstance = new SyncMessage(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:textsecure.SyncMessage)
}
public interface AttachmentPointerOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional fixed64 id = 1;
/**
* optional fixed64 id = 1;
*/
boolean hasId();
/**
* optional fixed64 id = 1;
*/
long getId();
// optional string contentType = 2;
/**
* optional string contentType = 2;
*/
boolean hasContentType();
/**
* optional string contentType = 2;
*/
java.lang.String getContentType();
/**
* optional string contentType = 2;
*/
com.google.protobuf.ByteString
getContentTypeBytes();
// optional bytes key = 3;
/**
* optional bytes key = 3;
*/
boolean hasKey();
/**
* optional bytes key = 3;
*/
com.google.protobuf.ByteString getKey();
// optional uint32 size = 4;
/**
* optional uint32 size = 4;
*/
boolean hasSize();
/**
* optional uint32 size = 4;
*/
int getSize();
// optional bytes thumbnail = 5;
/**
* optional bytes thumbnail = 5;
*/
boolean hasThumbnail();
/**
* optional bytes thumbnail = 5;
*/
com.google.protobuf.ByteString getThumbnail();
}
/**
* Protobuf type {@code textsecure.AttachmentPointer}
*/
public static final class AttachmentPointer extends
com.google.protobuf.GeneratedMessage
implements AttachmentPointerOrBuilder {
// Use AttachmentPointer.newBuilder() to construct.
private AttachmentPointer(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private AttachmentPointer(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final AttachmentPointer defaultInstance;
public static AttachmentPointer getDefaultInstance() {
return defaultInstance;
}
public AttachmentPointer getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AttachmentPointer(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 9: {
bitField0_ |= 0x00000001;
id_ = input.readFixed64();
break;
}
case 18: {
bitField0_ |= 0x00000002;
contentType_ = input.readBytes();
break;
}
case 26: {
bitField0_ |= 0x00000004;
key_ = input.readBytes();
break;
}
case 32: {
bitField0_ |= 0x00000008;
size_ = input.readUInt32();
break;
}
case 42: {
bitField0_ |= 0x00000010;
thumbnail_ = input.readBytes();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_AttachmentPointer_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_AttachmentPointer_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public AttachmentPointer parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AttachmentPointer(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
// optional fixed64 id = 1;
public static final int ID_FIELD_NUMBER = 1;
private long id_;
/**
* optional fixed64 id = 1;
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional fixed64 id = 1;
*/
public long getId() {
return id_;
}
// optional string contentType = 2;
public static final int CONTENTTYPE_FIELD_NUMBER = 2;
private java.lang.Object contentType_;
/**
* optional string contentType = 2;
*/
public boolean hasContentType() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional string contentType = 2;
*/
public java.lang.String getContentType() {
java.lang.Object ref = contentType_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
contentType_ = s;
}
return s;
}
}
/**
* optional string contentType = 2;
*/
public com.google.protobuf.ByteString
getContentTypeBytes() {
java.lang.Object ref = contentType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contentType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional bytes key = 3;
public static final int KEY_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString key_;
/**
* optional bytes key = 3;
*/
public boolean hasKey() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional bytes key = 3;
*/
public com.google.protobuf.ByteString getKey() {
return key_;
}
// optional uint32 size = 4;
public static final int SIZE_FIELD_NUMBER = 4;
private int size_;
/**
* optional uint32 size = 4;
*/
public boolean hasSize() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional uint32 size = 4;
*/
public int getSize() {
return size_;
}
// optional bytes thumbnail = 5;
public static final int THUMBNAIL_FIELD_NUMBER = 5;
private com.google.protobuf.ByteString thumbnail_;
/**
* optional bytes thumbnail = 5;
*/
public boolean hasThumbnail() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional bytes thumbnail = 5;
*/
public com.google.protobuf.ByteString getThumbnail() {
return thumbnail_;
}
private void initFields() {
id_ = 0L;
contentType_ = "";
key_ = com.google.protobuf.ByteString.EMPTY;
size_ = 0;
thumbnail_ = 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.writeFixed64(1, id_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBytes(2, getContentTypeBytes());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeBytes(3, key_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeUInt32(4, size_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeBytes(5, thumbnail_);
}
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
.computeFixed64Size(1, id_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, getContentTypeBytes());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, key_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(4, size_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(5, thumbnail_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code textsecure.AttachmentPointer}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_AttachmentPointer_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_AttachmentPointer_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder.class);
}
// Construct using org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
id_ = 0L;
bitField0_ = (bitField0_ & ~0x00000001);
contentType_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
key_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
size_ = 0;
bitField0_ = (bitField0_ & ~0x00000008);
thumbnail_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_AttachmentPointer_descriptor;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer getDefaultInstanceForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance();
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer build() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer buildPartial() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer result = new org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer(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.contentType_ = contentType_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.key_ = key_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008;
}
result.size_ = size_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010;
}
result.thumbnail_ = thumbnail_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer) {
return mergeFrom((org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer other) {
if (other == org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance()) return this;
if (other.hasId()) {
setId(other.getId());
}
if (other.hasContentType()) {
bitField0_ |= 0x00000002;
contentType_ = other.contentType_;
onChanged();
}
if (other.hasKey()) {
setKey(other.getKey());
}
if (other.hasSize()) {
setSize(other.getSize());
}
if (other.hasThumbnail()) {
setThumbnail(other.getThumbnail());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional fixed64 id = 1;
private long id_ ;
/**
* optional fixed64 id = 1;
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional fixed64 id = 1;
*/
public long getId() {
return id_;
}
/**
* optional fixed64 id = 1;
*/
public Builder setId(long value) {
bitField0_ |= 0x00000001;
id_ = value;
onChanged();
return this;
}
/**
* optional fixed64 id = 1;
*/
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000001);
id_ = 0L;
onChanged();
return this;
}
// optional string contentType = 2;
private java.lang.Object contentType_ = "";
/**
* optional string contentType = 2;
*/
public boolean hasContentType() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional string contentType = 2;
*/
public java.lang.String getContentType() {
java.lang.Object ref = contentType_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
contentType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string contentType = 2;
*/
public com.google.protobuf.ByteString
getContentTypeBytes() {
java.lang.Object ref = contentType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contentType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string contentType = 2;
*/
public Builder setContentType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
contentType_ = value;
onChanged();
return this;
}
/**
* optional string contentType = 2;
*/
public Builder clearContentType() {
bitField0_ = (bitField0_ & ~0x00000002);
contentType_ = getDefaultInstance().getContentType();
onChanged();
return this;
}
/**
* optional string contentType = 2;
*/
public Builder setContentTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
contentType_ = value;
onChanged();
return this;
}
// optional bytes key = 3;
private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes key = 3;
*/
public boolean hasKey() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional bytes key = 3;
*/
public com.google.protobuf.ByteString getKey() {
return key_;
}
/**
* optional bytes key = 3;
*/
public Builder setKey(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
key_ = value;
onChanged();
return this;
}
/**
* optional bytes key = 3;
*/
public Builder clearKey() {
bitField0_ = (bitField0_ & ~0x00000004);
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
// optional uint32 size = 4;
private int size_ ;
/**
* optional uint32 size = 4;
*/
public boolean hasSize() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional uint32 size = 4;
*/
public int getSize() {
return size_;
}
/**
* optional uint32 size = 4;
*/
public Builder setSize(int value) {
bitField0_ |= 0x00000008;
size_ = value;
onChanged();
return this;
}
/**
* optional uint32 size = 4;
*/
public Builder clearSize() {
bitField0_ = (bitField0_ & ~0x00000008);
size_ = 0;
onChanged();
return this;
}
// optional bytes thumbnail = 5;
private com.google.protobuf.ByteString thumbnail_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes thumbnail = 5;
*/
public boolean hasThumbnail() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional bytes thumbnail = 5;
*/
public com.google.protobuf.ByteString getThumbnail() {
return thumbnail_;
}
/**
* optional bytes thumbnail = 5;
*/
public Builder setThumbnail(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
thumbnail_ = value;
onChanged();
return this;
}
/**
* optional bytes thumbnail = 5;
*/
public Builder clearThumbnail() {
bitField0_ = (bitField0_ & ~0x00000010);
thumbnail_ = getDefaultInstance().getThumbnail();
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:textsecure.AttachmentPointer)
}
static {
defaultInstance = new AttachmentPointer(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:textsecure.AttachmentPointer)
}
public interface GroupContextOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional bytes id = 1;
/**
* optional bytes id = 1;
*/
boolean hasId();
/**
* optional bytes id = 1;
*/
com.google.protobuf.ByteString getId();
// optional .textsecure.GroupContext.Type type = 2;
/**
* optional .textsecure.GroupContext.Type type = 2;
*/
boolean hasType();
/**
* optional .textsecure.GroupContext.Type type = 2;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Type getType();
// optional string name = 3;
/**
* optional string name = 3;
*/
boolean hasName();
/**
* optional string name = 3;
*/
java.lang.String getName();
/**
* optional string name = 3;
*/
com.google.protobuf.ByteString
getNameBytes();
// repeated string members = 4;
/**
* repeated string members = 4;
*/
java.util.List
getMembersList();
/**
* repeated string members = 4;
*/
int getMembersCount();
/**
* repeated string members = 4;
*/
java.lang.String getMembers(int index);
/**
* repeated string members = 4;
*/
com.google.protobuf.ByteString
getMembersBytes(int index);
// optional .textsecure.AttachmentPointer avatar = 5;
/**
* optional .textsecure.AttachmentPointer avatar = 5;
*/
boolean hasAvatar();
/**
* optional .textsecure.AttachmentPointer avatar = 5;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer getAvatar();
/**
* optional .textsecure.AttachmentPointer avatar = 5;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder getAvatarOrBuilder();
}
/**
* Protobuf type {@code textsecure.GroupContext}
*/
public static final class GroupContext extends
com.google.protobuf.GeneratedMessage
implements GroupContextOrBuilder {
// Use GroupContext.newBuilder() to construct.
private GroupContext(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private GroupContext(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final GroupContext defaultInstance;
public static GroupContext getDefaultInstance() {
return defaultInstance;
}
public GroupContext getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GroupContext(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
id_ = input.readBytes();
break;
}
case 16: {
int rawValue = input.readEnum();
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Type value = org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Type.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(2, rawValue);
} else {
bitField0_ |= 0x00000002;
type_ = value;
}
break;
}
case 26: {
bitField0_ |= 0x00000004;
name_ = input.readBytes();
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
members_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000008;
}
members_.add(input.readBytes());
break;
}
case 42: {
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = avatar_.toBuilder();
}
avatar_ = input.readMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(avatar_);
avatar_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
members_ = new com.google.protobuf.UnmodifiableLazyStringList(members_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_GroupContext_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_GroupContext_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public GroupContext parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GroupContext(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
/**
* Protobuf enum {@code textsecure.GroupContext.Type}
*/
public enum Type
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN = 0;
*/
UNKNOWN(0, 0),
/**
* UPDATE = 1;
*/
UPDATE(1, 1),
/**
* DELIVER = 2;
*/
DELIVER(2, 2),
/**
* QUIT = 3;
*/
QUIT(3, 3),
;
/**
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
/**
* UPDATE = 1;
*/
public static final int UPDATE_VALUE = 1;
/**
* DELIVER = 2;
*/
public static final int DELIVER_VALUE = 2;
/**
* QUIT = 3;
*/
public static final int QUIT_VALUE = 3;
public final int getNumber() { return value; }
public static Type valueOf(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return UPDATE;
case 2: return DELIVER;
case 3: return QUIT;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Type findValueByNumber(int number) {
return Type.valueOf(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(index);
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.getDescriptor().getEnumTypes().get(0);
}
private static final Type[] VALUES = values();
public static Type valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int index;
private final int value;
private Type(int index, int value) {
this.index = index;
this.value = value;
}
// @@protoc_insertion_point(enum_scope:textsecure.GroupContext.Type)
}
private int bitField0_;
// optional bytes id = 1;
public static final int ID_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString id_;
/**
* optional bytes id = 1;
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional bytes id = 1;
*/
public com.google.protobuf.ByteString getId() {
return id_;
}
// optional .textsecure.GroupContext.Type type = 2;
public static final int TYPE_FIELD_NUMBER = 2;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Type type_;
/**
* optional .textsecure.GroupContext.Type type = 2;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional .textsecure.GroupContext.Type type = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Type getType() {
return type_;
}
// optional string name = 3;
public static final int NAME_FIELD_NUMBER = 3;
private java.lang.Object name_;
/**
* optional string name = 3;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional string name = 3;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
* optional string name = 3;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// repeated string members = 4;
public static final int MEMBERS_FIELD_NUMBER = 4;
private com.google.protobuf.LazyStringList members_;
/**
* repeated string members = 4;
*/
public java.util.List
getMembersList() {
return members_;
}
/**
* repeated string members = 4;
*/
public int getMembersCount() {
return members_.size();
}
/**
* repeated string members = 4;
*/
public java.lang.String getMembers(int index) {
return members_.get(index);
}
/**
* repeated string members = 4;
*/
public com.google.protobuf.ByteString
getMembersBytes(int index) {
return members_.getByteString(index);
}
// optional .textsecure.AttachmentPointer avatar = 5;
public static final int AVATAR_FIELD_NUMBER = 5;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer avatar_;
/**
* optional .textsecure.AttachmentPointer avatar = 5;
*/
public boolean hasAvatar() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional .textsecure.AttachmentPointer avatar = 5;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer getAvatar() {
return avatar_;
}
/**
* optional .textsecure.AttachmentPointer avatar = 5;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder getAvatarOrBuilder() {
return avatar_;
}
private void initFields() {
id_ = com.google.protobuf.ByteString.EMPTY;
type_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Type.UNKNOWN;
name_ = "";
members_ = com.google.protobuf.LazyStringArrayList.EMPTY;
avatar_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, id_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeEnum(2, type_.getNumber());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeBytes(3, getNameBytes());
}
for (int i = 0; i < members_.size(); i++) {
output.writeBytes(4, members_.getByteString(i));
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(5, avatar_);
}
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, id_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, type_.getNumber());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, getNameBytes());
}
{
int dataSize = 0;
for (int i = 0; i < members_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(members_.getByteString(i));
}
size += dataSize;
size += 1 * getMembersList().size();
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, avatar_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code textsecure.GroupContext}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContextOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_GroupContext_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_GroupContext_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Builder.class);
}
// Construct using org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getAvatarFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
id_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
type_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Type.UNKNOWN;
bitField0_ = (bitField0_ & ~0x00000002);
name_ = "";
bitField0_ = (bitField0_ & ~0x00000004);
members_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
if (avatarBuilder_ == null) {
avatar_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance();
} else {
avatarBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_GroupContext_descriptor;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext getDefaultInstanceForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.getDefaultInstance();
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext build() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext buildPartial() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext result = new org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext(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.type_ = type_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.name_ = name_;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
members_ = new com.google.protobuf.UnmodifiableLazyStringList(
members_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.members_ = members_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000008;
}
if (avatarBuilder_ == null) {
result.avatar_ = avatar_;
} else {
result.avatar_ = avatarBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext) {
return mergeFrom((org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext other) {
if (other == org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.getDefaultInstance()) return this;
if (other.hasId()) {
setId(other.getId());
}
if (other.hasType()) {
setType(other.getType());
}
if (other.hasName()) {
bitField0_ |= 0x00000004;
name_ = other.name_;
onChanged();
}
if (!other.members_.isEmpty()) {
if (members_.isEmpty()) {
members_ = other.members_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureMembersIsMutable();
members_.addAll(other.members_);
}
onChanged();
}
if (other.hasAvatar()) {
mergeAvatar(other.getAvatar());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional bytes id = 1;
private com.google.protobuf.ByteString id_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes id = 1;
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional bytes id = 1;
*/
public com.google.protobuf.ByteString getId() {
return id_;
}
/**
* optional bytes id = 1;
*/
public Builder setId(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
id_ = value;
onChanged();
return this;
}
/**
* optional bytes id = 1;
*/
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000001);
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
// optional .textsecure.GroupContext.Type type = 2;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Type type_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Type.UNKNOWN;
/**
* optional .textsecure.GroupContext.Type type = 2;
*/
public boolean hasType() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional .textsecure.GroupContext.Type type = 2;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Type getType() {
return type_;
}
/**
* optional .textsecure.GroupContext.Type type = 2;
*/
public Builder setType(org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Type value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
type_ = value;
onChanged();
return this;
}
/**
* optional .textsecure.GroupContext.Type type = 2;
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000002);
type_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupContext.Type.UNKNOWN;
onChanged();
return this;
}
// optional string name = 3;
private java.lang.Object name_ = "";
/**
* optional string name = 3;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional string name = 3;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string name = 3;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string name = 3;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
name_ = value;
onChanged();
return this;
}
/**
* optional string name = 3;
*/
public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000004);
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* optional string name = 3;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
name_ = value;
onChanged();
return this;
}
// repeated string members = 4;
private com.google.protobuf.LazyStringList members_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureMembersIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
members_ = new com.google.protobuf.LazyStringArrayList(members_);
bitField0_ |= 0x00000008;
}
}
/**
* repeated string members = 4;
*/
public java.util.List
getMembersList() {
return java.util.Collections.unmodifiableList(members_);
}
/**
* repeated string members = 4;
*/
public int getMembersCount() {
return members_.size();
}
/**
* repeated string members = 4;
*/
public java.lang.String getMembers(int index) {
return members_.get(index);
}
/**
* repeated string members = 4;
*/
public com.google.protobuf.ByteString
getMembersBytes(int index) {
return members_.getByteString(index);
}
/**
* repeated string members = 4;
*/
public Builder setMembers(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureMembersIsMutable();
members_.set(index, value);
onChanged();
return this;
}
/**
* repeated string members = 4;
*/
public Builder addMembers(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureMembersIsMutable();
members_.add(value);
onChanged();
return this;
}
/**
* repeated string members = 4;
*/
public Builder addAllMembers(
java.lang.Iterable values) {
ensureMembersIsMutable();
super.addAll(values, members_);
onChanged();
return this;
}
/**
* repeated string members = 4;
*/
public Builder clearMembers() {
members_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
* repeated string members = 4;
*/
public Builder addMembersBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureMembersIsMutable();
members_.add(value);
onChanged();
return this;
}
// optional .textsecure.AttachmentPointer avatar = 5;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer avatar_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder> avatarBuilder_;
/**
* optional .textsecure.AttachmentPointer avatar = 5;
*/
public boolean hasAvatar() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional .textsecure.AttachmentPointer avatar = 5;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer getAvatar() {
if (avatarBuilder_ == null) {
return avatar_;
} else {
return avatarBuilder_.getMessage();
}
}
/**
* optional .textsecure.AttachmentPointer avatar = 5;
*/
public Builder setAvatar(org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer value) {
if (avatarBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
avatar_ = value;
onChanged();
} else {
avatarBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
* optional .textsecure.AttachmentPointer avatar = 5;
*/
public Builder setAvatar(
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder builderForValue) {
if (avatarBuilder_ == null) {
avatar_ = builderForValue.build();
onChanged();
} else {
avatarBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
return this;
}
/**
* optional .textsecure.AttachmentPointer avatar = 5;
*/
public Builder mergeAvatar(org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer value) {
if (avatarBuilder_ == null) {
if (((bitField0_ & 0x00000010) == 0x00000010) &&
avatar_ != org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance()) {
avatar_ =
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.newBuilder(avatar_).mergeFrom(value).buildPartial();
} else {
avatar_ = value;
}
onChanged();
} else {
avatarBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
* optional .textsecure.AttachmentPointer avatar = 5;
*/
public Builder clearAvatar() {
if (avatarBuilder_ == null) {
avatar_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.getDefaultInstance();
onChanged();
} else {
avatarBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
/**
* optional .textsecure.AttachmentPointer avatar = 5;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder getAvatarBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getAvatarFieldBuilder().getBuilder();
}
/**
* optional .textsecure.AttachmentPointer avatar = 5;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder getAvatarOrBuilder() {
if (avatarBuilder_ != null) {
return avatarBuilder_.getMessageOrBuilder();
} else {
return avatar_;
}
}
/**
* optional .textsecure.AttachmentPointer avatar = 5;
*/
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder>
getAvatarFieldBuilder() {
if (avatarBuilder_ == null) {
avatarBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointer.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.AttachmentPointerOrBuilder>(
avatar_,
getParentForChildren(),
isClean());
avatar_ = null;
}
return avatarBuilder_;
}
// @@protoc_insertion_point(builder_scope:textsecure.GroupContext)
}
static {
defaultInstance = new GroupContext(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:textsecure.GroupContext)
}
public interface ContactDetailsOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional string number = 1;
/**
* optional string number = 1;
*/
boolean hasNumber();
/**
* optional string number = 1;
*/
java.lang.String getNumber();
/**
* optional string number = 1;
*/
com.google.protobuf.ByteString
getNumberBytes();
// optional string name = 2;
/**
* optional string name = 2;
*/
boolean hasName();
/**
* optional string name = 2;
*/
java.lang.String getName();
/**
* optional string name = 2;
*/
com.google.protobuf.ByteString
getNameBytes();
// optional .textsecure.ContactDetails.Avatar avatar = 3;
/**
* optional .textsecure.ContactDetails.Avatar avatar = 3;
*/
boolean hasAvatar();
/**
* optional .textsecure.ContactDetails.Avatar avatar = 3;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar getAvatar();
/**
* optional .textsecure.ContactDetails.Avatar avatar = 3;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.AvatarOrBuilder getAvatarOrBuilder();
}
/**
* Protobuf type {@code textsecure.ContactDetails}
*/
public static final class ContactDetails extends
com.google.protobuf.GeneratedMessage
implements ContactDetailsOrBuilder {
// Use ContactDetails.newBuilder() to construct.
private ContactDetails(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private ContactDetails(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final ContactDetails defaultInstance;
public static ContactDetails getDefaultInstance() {
return defaultInstance;
}
public ContactDetails getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ContactDetails(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
number_ = input.readBytes();
break;
}
case 18: {
bitField0_ |= 0x00000002;
name_ = input.readBytes();
break;
}
case 26: {
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = avatar_.toBuilder();
}
avatar_ = input.readMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(avatar_);
avatar_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_ContactDetails_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_ContactDetails_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public ContactDetails parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ContactDetails(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public interface AvatarOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional string contentType = 1;
/**
* optional string contentType = 1;
*/
boolean hasContentType();
/**
* optional string contentType = 1;
*/
java.lang.String getContentType();
/**
* optional string contentType = 1;
*/
com.google.protobuf.ByteString
getContentTypeBytes();
// optional uint32 length = 2;
/**
* optional uint32 length = 2;
*/
boolean hasLength();
/**
* optional uint32 length = 2;
*/
int getLength();
}
/**
* Protobuf type {@code textsecure.ContactDetails.Avatar}
*/
public static final class Avatar extends
com.google.protobuf.GeneratedMessage
implements AvatarOrBuilder {
// Use Avatar.newBuilder() to construct.
private Avatar(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private Avatar(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final Avatar defaultInstance;
public static Avatar getDefaultInstance() {
return defaultInstance;
}
public Avatar getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Avatar(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
contentType_ = input.readBytes();
break;
}
case 16: {
bitField0_ |= 0x00000002;
length_ = input.readUInt32();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_ContactDetails_Avatar_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_ContactDetails_Avatar_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public Avatar parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Avatar(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
// optional string contentType = 1;
public static final int CONTENTTYPE_FIELD_NUMBER = 1;
private java.lang.Object contentType_;
/**
* optional string contentType = 1;
*/
public boolean hasContentType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string contentType = 1;
*/
public java.lang.String getContentType() {
java.lang.Object ref = contentType_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
contentType_ = s;
}
return s;
}
}
/**
* optional string contentType = 1;
*/
public com.google.protobuf.ByteString
getContentTypeBytes() {
java.lang.Object ref = contentType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contentType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional uint32 length = 2;
public static final int LENGTH_FIELD_NUMBER = 2;
private int length_;
/**
* optional uint32 length = 2;
*/
public boolean hasLength() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional uint32 length = 2;
*/
public int getLength() {
return length_;
}
private void initFields() {
contentType_ = "";
length_ = 0;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, getContentTypeBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeUInt32(2, length_);
}
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, getContentTypeBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, length_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code textsecure.ContactDetails.Avatar}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.AvatarOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_ContactDetails_Avatar_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_ContactDetails_Avatar_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.Builder.class);
}
// Construct using org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
contentType_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
length_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_ContactDetails_Avatar_descriptor;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar getDefaultInstanceForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.getDefaultInstance();
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar build() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar buildPartial() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar result = new org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.contentType_ = contentType_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.length_ = length_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar) {
return mergeFrom((org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar other) {
if (other == org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.getDefaultInstance()) return this;
if (other.hasContentType()) {
bitField0_ |= 0x00000001;
contentType_ = other.contentType_;
onChanged();
}
if (other.hasLength()) {
setLength(other.getLength());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional string contentType = 1;
private java.lang.Object contentType_ = "";
/**
* optional string contentType = 1;
*/
public boolean hasContentType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string contentType = 1;
*/
public java.lang.String getContentType() {
java.lang.Object ref = contentType_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
contentType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string contentType = 1;
*/
public com.google.protobuf.ByteString
getContentTypeBytes() {
java.lang.Object ref = contentType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contentType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string contentType = 1;
*/
public Builder setContentType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
contentType_ = value;
onChanged();
return this;
}
/**
* optional string contentType = 1;
*/
public Builder clearContentType() {
bitField0_ = (bitField0_ & ~0x00000001);
contentType_ = getDefaultInstance().getContentType();
onChanged();
return this;
}
/**
* optional string contentType = 1;
*/
public Builder setContentTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
contentType_ = value;
onChanged();
return this;
}
// optional uint32 length = 2;
private int length_ ;
/**
* optional uint32 length = 2;
*/
public boolean hasLength() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional uint32 length = 2;
*/
public int getLength() {
return length_;
}
/**
* optional uint32 length = 2;
*/
public Builder setLength(int value) {
bitField0_ |= 0x00000002;
length_ = value;
onChanged();
return this;
}
/**
* optional uint32 length = 2;
*/
public Builder clearLength() {
bitField0_ = (bitField0_ & ~0x00000002);
length_ = 0;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:textsecure.ContactDetails.Avatar)
}
static {
defaultInstance = new Avatar(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:textsecure.ContactDetails.Avatar)
}
private int bitField0_;
// optional string number = 1;
public static final int NUMBER_FIELD_NUMBER = 1;
private java.lang.Object number_;
/**
* optional string number = 1;
*/
public boolean hasNumber() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string number = 1;
*/
public java.lang.String getNumber() {
java.lang.Object ref = number_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
number_ = s;
}
return s;
}
}
/**
* optional string number = 1;
*/
public com.google.protobuf.ByteString
getNumberBytes() {
java.lang.Object ref = number_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
number_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional string name = 2;
public static final int NAME_FIELD_NUMBER = 2;
private java.lang.Object name_;
/**
* optional string name = 2;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional string name = 2;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
* optional string name = 2;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional .textsecure.ContactDetails.Avatar avatar = 3;
public static final int AVATAR_FIELD_NUMBER = 3;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar avatar_;
/**
* optional .textsecure.ContactDetails.Avatar avatar = 3;
*/
public boolean hasAvatar() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional .textsecure.ContactDetails.Avatar avatar = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar getAvatar() {
return avatar_;
}
/**
* optional .textsecure.ContactDetails.Avatar avatar = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.AvatarOrBuilder getAvatarOrBuilder() {
return avatar_;
}
private void initFields() {
number_ = "";
name_ = "";
avatar_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, getNumberBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBytes(2, getNameBytes());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, avatar_);
}
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, getNumberBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, getNameBytes());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, avatar_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code textsecure.ContactDetails}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetailsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_ContactDetails_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_ContactDetails_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Builder.class);
}
// Construct using org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getAvatarFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
number_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
name_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
if (avatarBuilder_ == null) {
avatar_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.getDefaultInstance();
} else {
avatarBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_ContactDetails_descriptor;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails getDefaultInstanceForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.getDefaultInstance();
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails build() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails buildPartial() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails result = new org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.number_ = number_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.name_ = name_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
if (avatarBuilder_ == null) {
result.avatar_ = avatar_;
} else {
result.avatar_ = avatarBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails) {
return mergeFrom((org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails other) {
if (other == org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.getDefaultInstance()) return this;
if (other.hasNumber()) {
bitField0_ |= 0x00000001;
number_ = other.number_;
onChanged();
}
if (other.hasName()) {
bitField0_ |= 0x00000002;
name_ = other.name_;
onChanged();
}
if (other.hasAvatar()) {
mergeAvatar(other.getAvatar());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional string number = 1;
private java.lang.Object number_ = "";
/**
* optional string number = 1;
*/
public boolean hasNumber() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string number = 1;
*/
public java.lang.String getNumber() {
java.lang.Object ref = number_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
number_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string number = 1;
*/
public com.google.protobuf.ByteString
getNumberBytes() {
java.lang.Object ref = number_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
number_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string number = 1;
*/
public Builder setNumber(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
number_ = value;
onChanged();
return this;
}
/**
* optional string number = 1;
*/
public Builder clearNumber() {
bitField0_ = (bitField0_ & ~0x00000001);
number_ = getDefaultInstance().getNumber();
onChanged();
return this;
}
/**
* optional string number = 1;
*/
public Builder setNumberBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
number_ = value;
onChanged();
return this;
}
// optional string name = 2;
private java.lang.Object name_ = "";
/**
* optional string name = 2;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional string name = 2;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string name = 2;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string name = 2;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
name_ = value;
onChanged();
return this;
}
/**
* optional string name = 2;
*/
public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000002);
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* optional string name = 2;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
name_ = value;
onChanged();
return this;
}
// optional .textsecure.ContactDetails.Avatar avatar = 3;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar avatar_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar, org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.AvatarOrBuilder> avatarBuilder_;
/**
* optional .textsecure.ContactDetails.Avatar avatar = 3;
*/
public boolean hasAvatar() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional .textsecure.ContactDetails.Avatar avatar = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar getAvatar() {
if (avatarBuilder_ == null) {
return avatar_;
} else {
return avatarBuilder_.getMessage();
}
}
/**
* optional .textsecure.ContactDetails.Avatar avatar = 3;
*/
public Builder setAvatar(org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar value) {
if (avatarBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
avatar_ = value;
onChanged();
} else {
avatarBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .textsecure.ContactDetails.Avatar avatar = 3;
*/
public Builder setAvatar(
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.Builder builderForValue) {
if (avatarBuilder_ == null) {
avatar_ = builderForValue.build();
onChanged();
} else {
avatarBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .textsecure.ContactDetails.Avatar avatar = 3;
*/
public Builder mergeAvatar(org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar value) {
if (avatarBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004) &&
avatar_ != org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.getDefaultInstance()) {
avatar_ =
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.newBuilder(avatar_).mergeFrom(value).buildPartial();
} else {
avatar_ = value;
}
onChanged();
} else {
avatarBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .textsecure.ContactDetails.Avatar avatar = 3;
*/
public Builder clearAvatar() {
if (avatarBuilder_ == null) {
avatar_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.getDefaultInstance();
onChanged();
} else {
avatarBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
* optional .textsecure.ContactDetails.Avatar avatar = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.Builder getAvatarBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getAvatarFieldBuilder().getBuilder();
}
/**
* optional .textsecure.ContactDetails.Avatar avatar = 3;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.AvatarOrBuilder getAvatarOrBuilder() {
if (avatarBuilder_ != null) {
return avatarBuilder_.getMessageOrBuilder();
} else {
return avatar_;
}
}
/**
* optional .textsecure.ContactDetails.Avatar avatar = 3;
*/
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar, org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.AvatarOrBuilder>
getAvatarFieldBuilder() {
if (avatarBuilder_ == null) {
avatarBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar, org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.Avatar.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.ContactDetails.AvatarOrBuilder>(
avatar_,
getParentForChildren(),
isClean());
avatar_ = null;
}
return avatarBuilder_;
}
// @@protoc_insertion_point(builder_scope:textsecure.ContactDetails)
}
static {
defaultInstance = new ContactDetails(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:textsecure.ContactDetails)
}
public interface GroupDetailsOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional bytes id = 1;
/**
* optional bytes id = 1;
*/
boolean hasId();
/**
* optional bytes id = 1;
*/
com.google.protobuf.ByteString getId();
// optional string name = 2;
/**
* optional string name = 2;
*/
boolean hasName();
/**
* optional string name = 2;
*/
java.lang.String getName();
/**
* optional string name = 2;
*/
com.google.protobuf.ByteString
getNameBytes();
// repeated string members = 3;
/**
* repeated string members = 3;
*/
java.util.List
getMembersList();
/**
* repeated string members = 3;
*/
int getMembersCount();
/**
* repeated string members = 3;
*/
java.lang.String getMembers(int index);
/**
* repeated string members = 3;
*/
com.google.protobuf.ByteString
getMembersBytes(int index);
// optional .textsecure.GroupDetails.Avatar avatar = 4;
/**
* optional .textsecure.GroupDetails.Avatar avatar = 4;
*/
boolean hasAvatar();
/**
* optional .textsecure.GroupDetails.Avatar avatar = 4;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar getAvatar();
/**
* optional .textsecure.GroupDetails.Avatar avatar = 4;
*/
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.AvatarOrBuilder getAvatarOrBuilder();
// optional bool active = 5 [default = true];
/**
* optional bool active = 5 [default = true];
*/
boolean hasActive();
/**
* optional bool active = 5 [default = true];
*/
boolean getActive();
}
/**
* Protobuf type {@code textsecure.GroupDetails}
*/
public static final class GroupDetails extends
com.google.protobuf.GeneratedMessage
implements GroupDetailsOrBuilder {
// Use GroupDetails.newBuilder() to construct.
private GroupDetails(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private GroupDetails(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final GroupDetails defaultInstance;
public static GroupDetails getDefaultInstance() {
return defaultInstance;
}
public GroupDetails getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GroupDetails(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
id_ = input.readBytes();
break;
}
case 18: {
bitField0_ |= 0x00000002;
name_ = input.readBytes();
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
members_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
members_.add(input.readBytes());
break;
}
case 34: {
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = avatar_.toBuilder();
}
avatar_ = input.readMessage(org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(avatar_);
avatar_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 40: {
bitField0_ |= 0x00000008;
active_ = input.readBool();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
members_ = new com.google.protobuf.UnmodifiableLazyStringList(members_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_GroupDetails_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_GroupDetails_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public GroupDetails parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GroupDetails(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public interface AvatarOrBuilder
extends com.google.protobuf.MessageOrBuilder {
// optional string contentType = 1;
/**
* optional string contentType = 1;
*/
boolean hasContentType();
/**
* optional string contentType = 1;
*/
java.lang.String getContentType();
/**
* optional string contentType = 1;
*/
com.google.protobuf.ByteString
getContentTypeBytes();
// optional uint32 length = 2;
/**
* optional uint32 length = 2;
*/
boolean hasLength();
/**
* optional uint32 length = 2;
*/
int getLength();
}
/**
* Protobuf type {@code textsecure.GroupDetails.Avatar}
*/
public static final class Avatar extends
com.google.protobuf.GeneratedMessage
implements AvatarOrBuilder {
// Use Avatar.newBuilder() to construct.
private Avatar(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private Avatar(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
private static final Avatar defaultInstance;
public static Avatar getDefaultInstance() {
return defaultInstance;
}
public Avatar getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Avatar(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
contentType_ = input.readBytes();
break;
}
case 16: {
bitField0_ |= 0x00000002;
length_ = input.readUInt32();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_GroupDetails_Avatar_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_GroupDetails_Avatar_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.Builder.class);
}
public static com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
public Avatar parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Avatar(input, extensionRegistry);
}
};
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
private int bitField0_;
// optional string contentType = 1;
public static final int CONTENTTYPE_FIELD_NUMBER = 1;
private java.lang.Object contentType_;
/**
* optional string contentType = 1;
*/
public boolean hasContentType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string contentType = 1;
*/
public java.lang.String getContentType() {
java.lang.Object ref = contentType_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
contentType_ = s;
}
return s;
}
}
/**
* optional string contentType = 1;
*/
public com.google.protobuf.ByteString
getContentTypeBytes() {
java.lang.Object ref = contentType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contentType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// optional uint32 length = 2;
public static final int LENGTH_FIELD_NUMBER = 2;
private int length_;
/**
* optional uint32 length = 2;
*/
public boolean hasLength() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional uint32 length = 2;
*/
public int getLength() {
return length_;
}
private void initFields() {
contentType_ = "";
length_ = 0;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized != -1) return isInitialized == 1;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeBytes(1, getContentTypeBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeUInt32(2, length_);
}
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, getContentTypeBytes());
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, length_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code textsecure.GroupDetails.Avatar}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.AvatarOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_GroupDetails_Avatar_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_GroupDetails_Avatar_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.Builder.class);
}
// Construct using org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
contentType_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
length_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_GroupDetails_Avatar_descriptor;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar getDefaultInstanceForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.getDefaultInstance();
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar build() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar buildPartial() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar result = new org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.contentType_ = contentType_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.length_ = length_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar) {
return mergeFrom((org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar other) {
if (other == org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.getDefaultInstance()) return this;
if (other.hasContentType()) {
bitField0_ |= 0x00000001;
contentType_ = other.contentType_;
onChanged();
}
if (other.hasLength()) {
setLength(other.getLength());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional string contentType = 1;
private java.lang.Object contentType_ = "";
/**
* optional string contentType = 1;
*/
public boolean hasContentType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional string contentType = 1;
*/
public java.lang.String getContentType() {
java.lang.Object ref = contentType_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
contentType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string contentType = 1;
*/
public com.google.protobuf.ByteString
getContentTypeBytes() {
java.lang.Object ref = contentType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contentType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string contentType = 1;
*/
public Builder setContentType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
contentType_ = value;
onChanged();
return this;
}
/**
* optional string contentType = 1;
*/
public Builder clearContentType() {
bitField0_ = (bitField0_ & ~0x00000001);
contentType_ = getDefaultInstance().getContentType();
onChanged();
return this;
}
/**
* optional string contentType = 1;
*/
public Builder setContentTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
contentType_ = value;
onChanged();
return this;
}
// optional uint32 length = 2;
private int length_ ;
/**
* optional uint32 length = 2;
*/
public boolean hasLength() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional uint32 length = 2;
*/
public int getLength() {
return length_;
}
/**
* optional uint32 length = 2;
*/
public Builder setLength(int value) {
bitField0_ |= 0x00000002;
length_ = value;
onChanged();
return this;
}
/**
* optional uint32 length = 2;
*/
public Builder clearLength() {
bitField0_ = (bitField0_ & ~0x00000002);
length_ = 0;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:textsecure.GroupDetails.Avatar)
}
static {
defaultInstance = new Avatar(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:textsecure.GroupDetails.Avatar)
}
private int bitField0_;
// optional bytes id = 1;
public static final int ID_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString id_;
/**
* optional bytes id = 1;
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional bytes id = 1;
*/
public com.google.protobuf.ByteString getId() {
return id_;
}
// optional string name = 2;
public static final int NAME_FIELD_NUMBER = 2;
private java.lang.Object name_;
/**
* optional string name = 2;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional string name = 2;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
* optional string name = 2;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
// repeated string members = 3;
public static final int MEMBERS_FIELD_NUMBER = 3;
private com.google.protobuf.LazyStringList members_;
/**
* repeated string members = 3;
*/
public java.util.List
getMembersList() {
return members_;
}
/**
* repeated string members = 3;
*/
public int getMembersCount() {
return members_.size();
}
/**
* repeated string members = 3;
*/
public java.lang.String getMembers(int index) {
return members_.get(index);
}
/**
* repeated string members = 3;
*/
public com.google.protobuf.ByteString
getMembersBytes(int index) {
return members_.getByteString(index);
}
// optional .textsecure.GroupDetails.Avatar avatar = 4;
public static final int AVATAR_FIELD_NUMBER = 4;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar avatar_;
/**
* optional .textsecure.GroupDetails.Avatar avatar = 4;
*/
public boolean hasAvatar() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional .textsecure.GroupDetails.Avatar avatar = 4;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar getAvatar() {
return avatar_;
}
/**
* optional .textsecure.GroupDetails.Avatar avatar = 4;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.AvatarOrBuilder getAvatarOrBuilder() {
return avatar_;
}
// optional bool active = 5 [default = true];
public static final int ACTIVE_FIELD_NUMBER = 5;
private boolean active_;
/**
* optional bool active = 5 [default = true];
*/
public boolean hasActive() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional bool active = 5 [default = true];
*/
public boolean getActive() {
return active_;
}
private void initFields() {
id_ = com.google.protobuf.ByteString.EMPTY;
name_ = "";
members_ = com.google.protobuf.LazyStringArrayList.EMPTY;
avatar_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.getDefaultInstance();
active_ = true;
}
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, id_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBytes(2, getNameBytes());
}
for (int i = 0; i < members_.size(); i++) {
output.writeBytes(3, members_.getByteString(i));
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(4, avatar_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeBool(5, active_);
}
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, id_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, getNameBytes());
}
{
int dataSize = 0;
for (int i = 0; i < members_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(members_.getByteString(i));
}
size += dataSize;
size += 1 * getMembersList().size();
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, avatar_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, active_);
}
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
protected java.lang.Object writeReplace()
throws java.io.ObjectStreamException {
return super.writeReplace();
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static Builder newBuilder() { return Builder.create(); }
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder(org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code textsecure.GroupDetails}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder
implements org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetailsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_GroupDetails_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_GroupDetails_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.class, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Builder.class);
}
// Construct using org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
getAvatarFieldBuilder();
}
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
id_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
name_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
members_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
if (avatarBuilder_ == null) {
avatar_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.getDefaultInstance();
} else {
avatarBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
active_ = true;
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.internal_static_textsecure_GroupDetails_descriptor;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails getDefaultInstanceForType() {
return org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.getDefaultInstance();
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails build() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails buildPartial() {
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails result = new org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails(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.name_ = name_;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
members_ = new com.google.protobuf.UnmodifiableLazyStringList(
members_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.members_ = members_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000004;
}
if (avatarBuilder_ == null) {
result.avatar_ = avatar_;
} else {
result.avatar_ = avatarBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000008;
}
result.active_ = active_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails) {
return mergeFrom((org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails other) {
if (other == org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.getDefaultInstance()) return this;
if (other.hasId()) {
setId(other.getId());
}
if (other.hasName()) {
bitField0_ |= 0x00000002;
name_ = other.name_;
onChanged();
}
if (!other.members_.isEmpty()) {
if (members_.isEmpty()) {
members_ = other.members_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureMembersIsMutable();
members_.addAll(other.members_);
}
onChanged();
}
if (other.hasAvatar()) {
mergeAvatar(other.getAvatar());
}
if (other.hasActive()) {
setActive(other.getActive());
}
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
// optional bytes id = 1;
private com.google.protobuf.ByteString id_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes id = 1;
*/
public boolean hasId() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional bytes id = 1;
*/
public com.google.protobuf.ByteString getId() {
return id_;
}
/**
* optional bytes id = 1;
*/
public Builder setId(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
id_ = value;
onChanged();
return this;
}
/**
* optional bytes id = 1;
*/
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000001);
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
// optional string name = 2;
private java.lang.Object name_ = "";
/**
* optional string name = 2;
*/
public boolean hasName() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional string name = 2;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
java.lang.String s = ((com.google.protobuf.ByteString) ref)
.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string name = 2;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string name = 2;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
name_ = value;
onChanged();
return this;
}
/**
* optional string name = 2;
*/
public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000002);
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* optional string name = 2;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
name_ = value;
onChanged();
return this;
}
// repeated string members = 3;
private com.google.protobuf.LazyStringList members_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureMembersIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
members_ = new com.google.protobuf.LazyStringArrayList(members_);
bitField0_ |= 0x00000004;
}
}
/**
* repeated string members = 3;
*/
public java.util.List
getMembersList() {
return java.util.Collections.unmodifiableList(members_);
}
/**
* repeated string members = 3;
*/
public int getMembersCount() {
return members_.size();
}
/**
* repeated string members = 3;
*/
public java.lang.String getMembers(int index) {
return members_.get(index);
}
/**
* repeated string members = 3;
*/
public com.google.protobuf.ByteString
getMembersBytes(int index) {
return members_.getByteString(index);
}
/**
* repeated string members = 3;
*/
public Builder setMembers(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureMembersIsMutable();
members_.set(index, value);
onChanged();
return this;
}
/**
* repeated string members = 3;
*/
public Builder addMembers(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureMembersIsMutable();
members_.add(value);
onChanged();
return this;
}
/**
* repeated string members = 3;
*/
public Builder addAllMembers(
java.lang.Iterable values) {
ensureMembersIsMutable();
super.addAll(values, members_);
onChanged();
return this;
}
/**
* repeated string members = 3;
*/
public Builder clearMembers() {
members_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
* repeated string members = 3;
*/
public Builder addMembersBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureMembersIsMutable();
members_.add(value);
onChanged();
return this;
}
// optional .textsecure.GroupDetails.Avatar avatar = 4;
private org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar avatar_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.getDefaultInstance();
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.AvatarOrBuilder> avatarBuilder_;
/**
* optional .textsecure.GroupDetails.Avatar avatar = 4;
*/
public boolean hasAvatar() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional .textsecure.GroupDetails.Avatar avatar = 4;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar getAvatar() {
if (avatarBuilder_ == null) {
return avatar_;
} else {
return avatarBuilder_.getMessage();
}
}
/**
* optional .textsecure.GroupDetails.Avatar avatar = 4;
*/
public Builder setAvatar(org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar value) {
if (avatarBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
avatar_ = value;
onChanged();
} else {
avatarBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .textsecure.GroupDetails.Avatar avatar = 4;
*/
public Builder setAvatar(
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.Builder builderForValue) {
if (avatarBuilder_ == null) {
avatar_ = builderForValue.build();
onChanged();
} else {
avatarBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .textsecure.GroupDetails.Avatar avatar = 4;
*/
public Builder mergeAvatar(org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar value) {
if (avatarBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008) &&
avatar_ != org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.getDefaultInstance()) {
avatar_ =
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.newBuilder(avatar_).mergeFrom(value).buildPartial();
} else {
avatar_ = value;
}
onChanged();
} else {
avatarBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .textsecure.GroupDetails.Avatar avatar = 4;
*/
public Builder clearAvatar() {
if (avatarBuilder_ == null) {
avatar_ = org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.getDefaultInstance();
onChanged();
} else {
avatarBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
* optional .textsecure.GroupDetails.Avatar avatar = 4;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.Builder getAvatarBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getAvatarFieldBuilder().getBuilder();
}
/**
* optional .textsecure.GroupDetails.Avatar avatar = 4;
*/
public org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.AvatarOrBuilder getAvatarOrBuilder() {
if (avatarBuilder_ != null) {
return avatarBuilder_.getMessageOrBuilder();
} else {
return avatar_;
}
}
/**
* optional .textsecure.GroupDetails.Avatar avatar = 4;
*/
private com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.AvatarOrBuilder>
getAvatarFieldBuilder() {
if (avatarBuilder_ == null) {
avatarBuilder_ = new com.google.protobuf.SingleFieldBuilder<
org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.Avatar.Builder, org.whispersystems.textsecure.internal.push.TextSecureProtos.GroupDetails.AvatarOrBuilder>(
avatar_,
getParentForChildren(),
isClean());
avatar_ = null;
}
return avatarBuilder_;
}
// optional bool active = 5 [default = true];
private boolean active_ = true;
/**
* optional bool active = 5 [default = true];
*/
public boolean hasActive() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional bool active = 5 [default = true];
*/
public boolean getActive() {
return active_;
}
/**
* optional bool active = 5 [default = true];
*/
public Builder setActive(boolean value) {
bitField0_ |= 0x00000010;
active_ = value;
onChanged();
return this;
}
/**
* optional bool active = 5 [default = true];
*/
public Builder clearActive() {
bitField0_ = (bitField0_ & ~0x00000010);
active_ = true;
onChanged();
return this;
}
// @@protoc_insertion_point(builder_scope:textsecure.GroupDetails)
}
static {
defaultInstance = new GroupDetails(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:textsecure.GroupDetails)
}
private static com.google.protobuf.Descriptors.Descriptor
internal_static_textsecure_Envelope_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_textsecure_Envelope_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_textsecure_Content_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_textsecure_Content_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_textsecure_DataMessage_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_textsecure_DataMessage_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_textsecure_SyncMessage_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_textsecure_SyncMessage_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_textsecure_SyncMessage_Sent_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_textsecure_SyncMessage_Sent_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_textsecure_SyncMessage_Contacts_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_textsecure_SyncMessage_Contacts_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_textsecure_SyncMessage_Groups_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_textsecure_SyncMessage_Groups_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_textsecure_SyncMessage_Request_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_textsecure_SyncMessage_Request_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_textsecure_SyncMessage_Read_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_textsecure_SyncMessage_Read_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_textsecure_AttachmentPointer_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_textsecure_AttachmentPointer_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_textsecure_GroupContext_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_textsecure_GroupContext_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_textsecure_ContactDetails_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_textsecure_ContactDetails_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_textsecure_ContactDetails_Avatar_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_textsecure_ContactDetails_Avatar_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_textsecure_GroupDetails_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_textsecure_GroupDetails_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor
internal_static_textsecure_GroupDetails_Avatar_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_textsecure_GroupDetails_Avatar_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\020TextSecure.proto\022\ntextsecure\"\372\001\n\010Envel" +
"ope\022\'\n\004type\030\001 \001(\0162\031.textsecure.Envelope." +
"Type\022\016\n\006source\030\002 \001(\t\022\024\n\014sourceDevice\030\007 \001" +
"(\r\022\r\n\005relay\030\003 \001(\t\022\021\n\ttimestamp\030\005 \001(\004\022\025\n\r" +
"legacyMessage\030\006 \001(\014\022\017\n\007content\030\010 \001(\014\"U\n\004" +
"Type\022\013\n\007UNKNOWN\020\000\022\016\n\nCIPHERTEXT\020\001\022\020\n\014KEY" +
"_EXCHANGE\020\002\022\021\n\rPREKEY_BUNDLE\020\003\022\013\n\007RECEIP" +
"T\020\005\"e\n\007Content\022,\n\013dataMessage\030\001 \001(\0132\027.te" +
"xtsecure.DataMessage\022,\n\013syncMessage\030\002 \001(" +
"\0132\027.textsecure.SyncMessage\"\241\001\n\013DataMessa",
"ge\022\014\n\004body\030\001 \001(\t\0222\n\013attachments\030\002 \003(\0132\035." +
"textsecure.AttachmentPointer\022\'\n\005group\030\003 " +
"\001(\0132\030.textsecure.GroupContext\022\r\n\005flags\030\004" +
" \001(\r\"\030\n\005Flags\022\017\n\013END_SESSION\020\001\"\336\004\n\013SyncM" +
"essage\022*\n\004sent\030\001 \001(\0132\034.textsecure.SyncMe" +
"ssage.Sent\0222\n\010contacts\030\002 \001(\0132 .textsecur" +
"e.SyncMessage.Contacts\022.\n\006groups\030\003 \001(\0132\036" +
".textsecure.SyncMessage.Groups\0220\n\007reques" +
"t\030\004 \001(\0132\037.textsecure.SyncMessage.Request" +
"\022*\n\004read\030\005 \003(\0132\034.textsecure.SyncMessage.",
"Read\032X\n\004Sent\022\023\n\013destination\030\001 \001(\t\022\021\n\ttim" +
"estamp\030\002 \001(\004\022(\n\007message\030\003 \001(\0132\027.textsecu" +
"re.DataMessage\0327\n\010Contacts\022+\n\004blob\030\001 \001(\013" +
"2\035.textsecure.AttachmentPointer\0325\n\006Group" +
"s\022+\n\004blob\030\001 \001(\0132\035.textsecure.AttachmentP" +
"ointer\032l\n\007Request\0222\n\004type\030\001 \001(\0162$.textse" +
"cure.SyncMessage.Request.Type\"-\n\004Type\022\013\n" +
"\007UNKNOWN\020\000\022\014\n\010CONTACTS\020\001\022\n\n\006GROUPS\020\002\032)\n\004" +
"Read\022\016\n\006sender\030\001 \001(\t\022\021\n\ttimestamp\030\002 \001(\004\"" +
"b\n\021AttachmentPointer\022\n\n\002id\030\001 \001(\006\022\023\n\013cont",
"entType\030\002 \001(\t\022\013\n\003key\030\003 \001(\014\022\014\n\004size\030\004 \001(\r" +
"\022\021\n\tthumbnail\030\005 \001(\014\"\315\001\n\014GroupContext\022\n\n\002" +
"id\030\001 \001(\014\022+\n\004type\030\002 \001(\0162\035.textsecure.Grou" +
"pContext.Type\022\014\n\004name\030\003 \001(\t\022\017\n\007members\030\004" +
" \003(\t\022-\n\006avatar\030\005 \001(\0132\035.textsecure.Attach" +
"mentPointer\"6\n\004Type\022\013\n\007UNKNOWN\020\000\022\n\n\006UPDA" +
"TE\020\001\022\013\n\007DELIVER\020\002\022\010\n\004QUIT\020\003\"\220\001\n\016ContactD" +
"etails\022\016\n\006number\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\0221\n\006" +
"avatar\030\003 \001(\0132!.textsecure.ContactDetails" +
".Avatar\032-\n\006Avatar\022\023\n\013contentType\030\001 \001(\t\022\016",
"\n\006length\030\002 \001(\r\"\257\001\n\014GroupDetails\022\n\n\002id\030\001 " +
"\001(\014\022\014\n\004name\030\002 \001(\t\022\017\n\007members\030\003 \003(\t\022/\n\006av" +
"atar\030\004 \001(\0132\037.textsecure.GroupDetails.Ava" +
"tar\022\024\n\006active\030\005 \001(\010:\004true\032-\n\006Avatar\022\023\n\013c" +
"ontentType\030\001 \001(\t\022\016\n\006length\030\002 \001(\rB?\n+org." +
"whispersystems.textsecure.internal.pushB" +
"\020TextSecureProtos"
};
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_Envelope_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_textsecure_Envelope_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_textsecure_Envelope_descriptor,
new java.lang.String[] { "Type", "Source", "SourceDevice", "Relay", "Timestamp", "LegacyMessage", "Content", });
internal_static_textsecure_Content_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_textsecure_Content_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_textsecure_Content_descriptor,
new java.lang.String[] { "DataMessage", "SyncMessage", });
internal_static_textsecure_DataMessage_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_textsecure_DataMessage_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_textsecure_DataMessage_descriptor,
new java.lang.String[] { "Body", "Attachments", "Group", "Flags", });
internal_static_textsecure_SyncMessage_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_textsecure_SyncMessage_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_textsecure_SyncMessage_descriptor,
new java.lang.String[] { "Sent", "Contacts", "Groups", "Request", "Read", });
internal_static_textsecure_SyncMessage_Sent_descriptor =
internal_static_textsecure_SyncMessage_descriptor.getNestedTypes().get(0);
internal_static_textsecure_SyncMessage_Sent_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_textsecure_SyncMessage_Sent_descriptor,
new java.lang.String[] { "Destination", "Timestamp", "Message", });
internal_static_textsecure_SyncMessage_Contacts_descriptor =
internal_static_textsecure_SyncMessage_descriptor.getNestedTypes().get(1);
internal_static_textsecure_SyncMessage_Contacts_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_textsecure_SyncMessage_Contacts_descriptor,
new java.lang.String[] { "Blob", });
internal_static_textsecure_SyncMessage_Groups_descriptor =
internal_static_textsecure_SyncMessage_descriptor.getNestedTypes().get(2);
internal_static_textsecure_SyncMessage_Groups_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_textsecure_SyncMessage_Groups_descriptor,
new java.lang.String[] { "Blob", });
internal_static_textsecure_SyncMessage_Request_descriptor =
internal_static_textsecure_SyncMessage_descriptor.getNestedTypes().get(3);
internal_static_textsecure_SyncMessage_Request_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_textsecure_SyncMessage_Request_descriptor,
new java.lang.String[] { "Type", });
internal_static_textsecure_SyncMessage_Read_descriptor =
internal_static_textsecure_SyncMessage_descriptor.getNestedTypes().get(4);
internal_static_textsecure_SyncMessage_Read_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_textsecure_SyncMessage_Read_descriptor,
new java.lang.String[] { "Sender", "Timestamp", });
internal_static_textsecure_AttachmentPointer_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_textsecure_AttachmentPointer_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_textsecure_AttachmentPointer_descriptor,
new java.lang.String[] { "Id", "ContentType", "Key", "Size", "Thumbnail", });
internal_static_textsecure_GroupContext_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_textsecure_GroupContext_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_textsecure_GroupContext_descriptor,
new java.lang.String[] { "Id", "Type", "Name", "Members", "Avatar", });
internal_static_textsecure_ContactDetails_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_textsecure_ContactDetails_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_textsecure_ContactDetails_descriptor,
new java.lang.String[] { "Number", "Name", "Avatar", });
internal_static_textsecure_ContactDetails_Avatar_descriptor =
internal_static_textsecure_ContactDetails_descriptor.getNestedTypes().get(0);
internal_static_textsecure_ContactDetails_Avatar_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_textsecure_ContactDetails_Avatar_descriptor,
new java.lang.String[] { "ContentType", "Length", });
internal_static_textsecure_GroupDetails_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_textsecure_GroupDetails_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_textsecure_GroupDetails_descriptor,
new java.lang.String[] { "Id", "Name", "Members", "Avatar", "Active", });
internal_static_textsecure_GroupDetails_Avatar_descriptor =
internal_static_textsecure_GroupDetails_descriptor.getNestedTypes().get(0);
internal_static_textsecure_GroupDetails_Avatar_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_textsecure_GroupDetails_Avatar_descriptor,
new java.lang.String[] { "ContentType", "Length", });
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy