2013-08-29 17:01:30 -07:00
|
|
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
|
|
// source: IncomingPushMessageSignal.proto
|
|
|
|
|
|
|
|
package org.whispersystems.textsecure.push;
|
|
|
|
|
|
|
|
public final class PushMessageProtos {
|
|
|
|
private PushMessageProtos() {}
|
|
|
|
public static void registerAllExtensions(
|
|
|
|
com.google.protobuf.ExtensionRegistry registry) {
|
|
|
|
}
|
|
|
|
public interface IncomingPushMessageSignalOrBuilder
|
|
|
|
extends com.google.protobuf.MessageOrBuilder {
|
|
|
|
|
|
|
|
// optional uint32 type = 1;
|
|
|
|
boolean hasType();
|
|
|
|
int getType();
|
|
|
|
|
|
|
|
// optional string source = 2;
|
|
|
|
boolean hasSource();
|
|
|
|
String getSource();
|
|
|
|
|
2013-10-18 22:45:27 -07:00
|
|
|
// optional string relay = 3;
|
|
|
|
boolean hasRelay();
|
|
|
|
String getRelay();
|
|
|
|
|
|
|
|
// repeated string destinations = 4;
|
2013-08-29 17:01:30 -07:00
|
|
|
java.util.List<String> getDestinationsList();
|
|
|
|
int getDestinationsCount();
|
|
|
|
String getDestinations(int index);
|
|
|
|
|
2013-10-18 22:45:27 -07:00
|
|
|
// optional uint64 timestamp = 5;
|
2013-09-08 18:19:05 -07:00
|
|
|
boolean hasTimestamp();
|
|
|
|
long getTimestamp();
|
|
|
|
|
2013-10-18 22:45:27 -07:00
|
|
|
// optional bytes message = 6;
|
2013-08-29 17:01:30 -07:00
|
|
|
boolean hasMessage();
|
|
|
|
com.google.protobuf.ByteString getMessage();
|
2013-09-08 18:19:05 -07:00
|
|
|
}
|
|
|
|
public static final class IncomingPushMessageSignal extends
|
|
|
|
com.google.protobuf.GeneratedMessage
|
|
|
|
implements IncomingPushMessageSignalOrBuilder {
|
|
|
|
// Use IncomingPushMessageSignal.newBuilder() to construct.
|
|
|
|
private IncomingPushMessageSignal(Builder builder) {
|
|
|
|
super(builder);
|
|
|
|
}
|
|
|
|
private IncomingPushMessageSignal(boolean noInit) {}
|
|
|
|
|
|
|
|
private static final IncomingPushMessageSignal defaultInstance;
|
|
|
|
public static IncomingPushMessageSignal getDefaultInstance() {
|
|
|
|
return defaultInstance;
|
|
|
|
}
|
|
|
|
|
|
|
|
public IncomingPushMessageSignal getDefaultInstanceForType() {
|
|
|
|
return defaultInstance;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final com.google.protobuf.Descriptors.Descriptor
|
|
|
|
getDescriptor() {
|
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.internal_static_textsecure_IncomingPushMessageSignal_descriptor;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
|
|
|
internalGetFieldAccessorTable() {
|
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.internal_static_textsecure_IncomingPushMessageSignal_fieldAccessorTable;
|
|
|
|
}
|
|
|
|
|
|
|
|
private int bitField0_;
|
|
|
|
// optional uint32 type = 1;
|
|
|
|
public static final int TYPE_FIELD_NUMBER = 1;
|
|
|
|
private int type_;
|
|
|
|
public boolean hasType() {
|
|
|
|
return ((bitField0_ & 0x00000001) == 0x00000001);
|
|
|
|
}
|
|
|
|
public int getType() {
|
|
|
|
return type_;
|
|
|
|
}
|
|
|
|
|
|
|
|
// optional string source = 2;
|
|
|
|
public static final int SOURCE_FIELD_NUMBER = 2;
|
|
|
|
private java.lang.Object source_;
|
|
|
|
public boolean hasSource() {
|
|
|
|
return ((bitField0_ & 0x00000002) == 0x00000002);
|
|
|
|
}
|
|
|
|
public String getSource() {
|
|
|
|
java.lang.Object ref = source_;
|
|
|
|
if (ref instanceof String) {
|
|
|
|
return (String) ref;
|
|
|
|
} else {
|
|
|
|
com.google.protobuf.ByteString bs =
|
|
|
|
(com.google.protobuf.ByteString) ref;
|
|
|
|
String s = bs.toStringUtf8();
|
|
|
|
if (com.google.protobuf.Internal.isValidUtf8(bs)) {
|
|
|
|
source_ = s;
|
|
|
|
}
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
private com.google.protobuf.ByteString getSourceBytes() {
|
|
|
|
java.lang.Object ref = source_;
|
|
|
|
if (ref instanceof String) {
|
|
|
|
com.google.protobuf.ByteString b =
|
|
|
|
com.google.protobuf.ByteString.copyFromUtf8((String) ref);
|
|
|
|
source_ = b;
|
|
|
|
return b;
|
|
|
|
} else {
|
|
|
|
return (com.google.protobuf.ByteString) ref;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-10-18 22:45:27 -07:00
|
|
|
// optional string relay = 3;
|
|
|
|
public static final int RELAY_FIELD_NUMBER = 3;
|
|
|
|
private java.lang.Object relay_;
|
|
|
|
public boolean hasRelay() {
|
|
|
|
return ((bitField0_ & 0x00000004) == 0x00000004);
|
|
|
|
}
|
|
|
|
public String getRelay() {
|
|
|
|
java.lang.Object ref = relay_;
|
|
|
|
if (ref instanceof String) {
|
|
|
|
return (String) ref;
|
|
|
|
} else {
|
|
|
|
com.google.protobuf.ByteString bs =
|
|
|
|
(com.google.protobuf.ByteString) ref;
|
|
|
|
String s = bs.toStringUtf8();
|
|
|
|
if (com.google.protobuf.Internal.isValidUtf8(bs)) {
|
|
|
|
relay_ = s;
|
|
|
|
}
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
private com.google.protobuf.ByteString getRelayBytes() {
|
|
|
|
java.lang.Object ref = relay_;
|
|
|
|
if (ref instanceof String) {
|
|
|
|
com.google.protobuf.ByteString b =
|
|
|
|
com.google.protobuf.ByteString.copyFromUtf8((String) ref);
|
|
|
|
relay_ = b;
|
|
|
|
return b;
|
|
|
|
} else {
|
|
|
|
return (com.google.protobuf.ByteString) ref;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated string destinations = 4;
|
|
|
|
public static final int DESTINATIONS_FIELD_NUMBER = 4;
|
2013-09-08 18:19:05 -07:00
|
|
|
private com.google.protobuf.LazyStringList destinations_;
|
|
|
|
public java.util.List<String>
|
|
|
|
getDestinationsList() {
|
|
|
|
return destinations_;
|
|
|
|
}
|
|
|
|
public int getDestinationsCount() {
|
|
|
|
return destinations_.size();
|
|
|
|
}
|
|
|
|
public String getDestinations(int index) {
|
|
|
|
return destinations_.get(index);
|
|
|
|
}
|
|
|
|
|
2013-10-18 22:45:27 -07:00
|
|
|
// optional uint64 timestamp = 5;
|
|
|
|
public static final int TIMESTAMP_FIELD_NUMBER = 5;
|
2013-09-08 18:19:05 -07:00
|
|
|
private long timestamp_;
|
|
|
|
public boolean hasTimestamp() {
|
2013-10-18 22:45:27 -07:00
|
|
|
return ((bitField0_ & 0x00000008) == 0x00000008);
|
2013-09-08 18:19:05 -07:00
|
|
|
}
|
|
|
|
public long getTimestamp() {
|
|
|
|
return timestamp_;
|
|
|
|
}
|
|
|
|
|
2013-10-18 22:45:27 -07:00
|
|
|
// optional bytes message = 6;
|
|
|
|
public static final int MESSAGE_FIELD_NUMBER = 6;
|
2013-09-08 18:19:05 -07:00
|
|
|
private com.google.protobuf.ByteString message_;
|
|
|
|
public boolean hasMessage() {
|
2013-10-18 22:45:27 -07:00
|
|
|
return ((bitField0_ & 0x00000010) == 0x00000010);
|
2013-09-08 18:19:05 -07:00
|
|
|
}
|
|
|
|
public com.google.protobuf.ByteString getMessage() {
|
|
|
|
return message_;
|
|
|
|
}
|
|
|
|
|
|
|
|
private void initFields() {
|
|
|
|
type_ = 0;
|
|
|
|
source_ = "";
|
2013-10-18 22:45:27 -07:00
|
|
|
relay_ = "";
|
2013-09-08 18:19:05 -07:00
|
|
|
destinations_ = com.google.protobuf.LazyStringArrayList.EMPTY;
|
|
|
|
timestamp_ = 0L;
|
|
|
|
message_ = com.google.protobuf.ByteString.EMPTY;
|
|
|
|
}
|
|
|
|
private byte memoizedIsInitialized = -1;
|
|
|
|
public final boolean isInitialized() {
|
|
|
|
byte isInitialized = memoizedIsInitialized;
|
|
|
|
if (isInitialized != -1) return isInitialized == 1;
|
|
|
|
|
|
|
|
memoizedIsInitialized = 1;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
|
|
|
throws java.io.IOException {
|
|
|
|
getSerializedSize();
|
|
|
|
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
|
|
|
output.writeUInt32(1, type_);
|
|
|
|
}
|
|
|
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
|
|
|
output.writeBytes(2, getSourceBytes());
|
|
|
|
}
|
|
|
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
2013-10-18 22:45:27 -07:00
|
|
|
output.writeBytes(3, getRelayBytes());
|
|
|
|
}
|
|
|
|
for (int i = 0; i < destinations_.size(); i++) {
|
|
|
|
output.writeBytes(4, destinations_.getByteString(i));
|
2013-09-08 18:19:05 -07:00
|
|
|
}
|
|
|
|
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
2013-10-18 22:45:27 -07:00
|
|
|
output.writeUInt64(5, timestamp_);
|
|
|
|
}
|
|
|
|
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
|
|
|
output.writeBytes(6, message_);
|
2013-09-08 18:19:05 -07:00
|
|
|
}
|
|
|
|
getUnknownFields().writeTo(output);
|
|
|
|
}
|
|
|
|
|
|
|
|
private int memoizedSerializedSize = -1;
|
|
|
|
public int getSerializedSize() {
|
|
|
|
int size = memoizedSerializedSize;
|
|
|
|
if (size != -1) return size;
|
|
|
|
|
|
|
|
size = 0;
|
|
|
|
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
|
|
|
size += com.google.protobuf.CodedOutputStream
|
|
|
|
.computeUInt32Size(1, type_);
|
|
|
|
}
|
|
|
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
|
|
|
size += com.google.protobuf.CodedOutputStream
|
|
|
|
.computeBytesSize(2, getSourceBytes());
|
|
|
|
}
|
2013-10-18 22:45:27 -07:00
|
|
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
|
|
|
size += com.google.protobuf.CodedOutputStream
|
|
|
|
.computeBytesSize(3, getRelayBytes());
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
{
|
|
|
|
int dataSize = 0;
|
|
|
|
for (int i = 0; i < destinations_.size(); i++) {
|
|
|
|
dataSize += com.google.protobuf.CodedOutputStream
|
|
|
|
.computeBytesSizeNoTag(destinations_.getByteString(i));
|
|
|
|
}
|
|
|
|
size += dataSize;
|
|
|
|
size += 1 * getDestinationsList().size();
|
|
|
|
}
|
2013-10-18 22:45:27 -07:00
|
|
|
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
2013-09-08 18:19:05 -07:00
|
|
|
size += com.google.protobuf.CodedOutputStream
|
2013-10-18 22:45:27 -07:00
|
|
|
.computeUInt64Size(5, timestamp_);
|
2013-09-08 18:19:05 -07:00
|
|
|
}
|
2013-10-18 22:45:27 -07:00
|
|
|
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
2013-09-08 18:19:05 -07:00
|
|
|
size += com.google.protobuf.CodedOutputStream
|
2013-10-18 22:45:27 -07:00
|
|
|
.computeBytesSize(6, message_);
|
2013-09-08 18:19:05 -07:00
|
|
|
}
|
|
|
|
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.push.PushMessageProtos.IncomingPushMessageSignal parseFrom(
|
|
|
|
com.google.protobuf.ByteString data)
|
|
|
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
|
return newBuilder().mergeFrom(data).buildParsed();
|
|
|
|
}
|
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal parseFrom(
|
|
|
|
com.google.protobuf.ByteString data,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
|
return newBuilder().mergeFrom(data, extensionRegistry)
|
|
|
|
.buildParsed();
|
|
|
|
}
|
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal parseFrom(byte[] data)
|
|
|
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
|
return newBuilder().mergeFrom(data).buildParsed();
|
|
|
|
}
|
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal parseFrom(
|
|
|
|
byte[] data,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
|
return newBuilder().mergeFrom(data, extensionRegistry)
|
|
|
|
.buildParsed();
|
|
|
|
}
|
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal parseFrom(java.io.InputStream input)
|
|
|
|
throws java.io.IOException {
|
|
|
|
return newBuilder().mergeFrom(input).buildParsed();
|
|
|
|
}
|
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal parseFrom(
|
|
|
|
java.io.InputStream input,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws java.io.IOException {
|
|
|
|
return newBuilder().mergeFrom(input, extensionRegistry)
|
|
|
|
.buildParsed();
|
|
|
|
}
|
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal parseDelimitedFrom(java.io.InputStream input)
|
|
|
|
throws java.io.IOException {
|
|
|
|
Builder builder = newBuilder();
|
|
|
|
if (builder.mergeDelimitedFrom(input)) {
|
|
|
|
return builder.buildParsed();
|
|
|
|
} else {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal parseDelimitedFrom(
|
|
|
|
java.io.InputStream input,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws java.io.IOException {
|
|
|
|
Builder builder = newBuilder();
|
|
|
|
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
|
|
|
|
return builder.buildParsed();
|
|
|
|
} else {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal parseFrom(
|
|
|
|
com.google.protobuf.CodedInputStream input)
|
|
|
|
throws java.io.IOException {
|
|
|
|
return newBuilder().mergeFrom(input).buildParsed();
|
|
|
|
}
|
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal parseFrom(
|
|
|
|
com.google.protobuf.CodedInputStream input,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws java.io.IOException {
|
|
|
|
return newBuilder().mergeFrom(input, extensionRegistry)
|
|
|
|
.buildParsed();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Builder newBuilder() { return Builder.create(); }
|
|
|
|
public Builder newBuilderForType() { return newBuilder(); }
|
|
|
|
public static Builder newBuilder(org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal prototype) {
|
|
|
|
return newBuilder().mergeFrom(prototype);
|
|
|
|
}
|
|
|
|
public Builder toBuilder() { return newBuilder(this); }
|
|
|
|
|
|
|
|
@java.lang.Override
|
|
|
|
protected Builder newBuilderForType(
|
|
|
|
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
|
|
|
|
Builder builder = new Builder(parent);
|
|
|
|
return builder;
|
|
|
|
}
|
|
|
|
public static final class Builder extends
|
|
|
|
com.google.protobuf.GeneratedMessage.Builder<Builder>
|
|
|
|
implements org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignalOrBuilder {
|
|
|
|
public static final com.google.protobuf.Descriptors.Descriptor
|
|
|
|
getDescriptor() {
|
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.internal_static_textsecure_IncomingPushMessageSignal_descriptor;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
|
|
|
internalGetFieldAccessorTable() {
|
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.internal_static_textsecure_IncomingPushMessageSignal_fieldAccessorTable;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Construct using org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal.newBuilder()
|
|
|
|
private Builder() {
|
|
|
|
maybeForceBuilderInitialization();
|
|
|
|
}
|
|
|
|
|
|
|
|
private Builder(BuilderParent parent) {
|
|
|
|
super(parent);
|
|
|
|
maybeForceBuilderInitialization();
|
|
|
|
}
|
|
|
|
private void maybeForceBuilderInitialization() {
|
|
|
|
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
private static Builder create() {
|
|
|
|
return new Builder();
|
|
|
|
}
|
|
|
|
|
|
|
|
public Builder clear() {
|
|
|
|
super.clear();
|
|
|
|
type_ = 0;
|
|
|
|
bitField0_ = (bitField0_ & ~0x00000001);
|
|
|
|
source_ = "";
|
|
|
|
bitField0_ = (bitField0_ & ~0x00000002);
|
2013-10-18 22:45:27 -07:00
|
|
|
relay_ = "";
|
2013-09-08 18:19:05 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000004);
|
2013-10-18 22:45:27 -07:00
|
|
|
destinations_ = com.google.protobuf.LazyStringArrayList.EMPTY;
|
2013-09-08 18:19:05 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000008);
|
2013-10-18 22:45:27 -07:00
|
|
|
timestamp_ = 0L;
|
2013-09-08 18:19:05 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000010);
|
2013-10-18 22:45:27 -07:00
|
|
|
message_ = com.google.protobuf.ByteString.EMPTY;
|
|
|
|
bitField0_ = (bitField0_ & ~0x00000020);
|
2013-09-08 18:19:05 -07:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Builder clone() {
|
|
|
|
return create().mergeFrom(buildPartial());
|
|
|
|
}
|
|
|
|
|
|
|
|
public com.google.protobuf.Descriptors.Descriptor
|
|
|
|
getDescriptorForType() {
|
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal.getDescriptor();
|
|
|
|
}
|
|
|
|
|
|
|
|
public org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal getDefaultInstanceForType() {
|
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal.getDefaultInstance();
|
|
|
|
}
|
|
|
|
|
|
|
|
public org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal build() {
|
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal result = buildPartial();
|
|
|
|
if (!result.isInitialized()) {
|
|
|
|
throw newUninitializedMessageException(result);
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
private org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal buildParsed()
|
|
|
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal result = buildPartial();
|
|
|
|
if (!result.isInitialized()) {
|
|
|
|
throw newUninitializedMessageException(
|
|
|
|
result).asInvalidProtocolBufferException();
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
public org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal buildPartial() {
|
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal result = new org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal(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_;
|
2013-10-18 22:45:27 -07:00
|
|
|
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
|
|
|
to_bitField0_ |= 0x00000004;
|
|
|
|
}
|
|
|
|
result.relay_ = relay_;
|
|
|
|
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
2013-09-08 18:19:05 -07:00
|
|
|
destinations_ = new com.google.protobuf.UnmodifiableLazyStringList(
|
|
|
|
destinations_);
|
2013-10-18 22:45:27 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000008);
|
2013-09-08 18:19:05 -07:00
|
|
|
}
|
|
|
|
result.destinations_ = destinations_;
|
|
|
|
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
|
|
|
|
to_bitField0_ |= 0x00000008;
|
|
|
|
}
|
2013-10-18 22:45:27 -07:00
|
|
|
result.timestamp_ = timestamp_;
|
|
|
|
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
|
|
|
|
to_bitField0_ |= 0x00000010;
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
result.message_ = message_;
|
|
|
|
result.bitField0_ = to_bitField0_;
|
|
|
|
onBuilt();
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Builder mergeFrom(com.google.protobuf.Message other) {
|
|
|
|
if (other instanceof org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal) {
|
|
|
|
return mergeFrom((org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal)other);
|
|
|
|
} else {
|
|
|
|
super.mergeFrom(other);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public Builder mergeFrom(org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal other) {
|
|
|
|
if (other == org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal.getDefaultInstance()) return this;
|
|
|
|
if (other.hasType()) {
|
|
|
|
setType(other.getType());
|
|
|
|
}
|
|
|
|
if (other.hasSource()) {
|
|
|
|
setSource(other.getSource());
|
|
|
|
}
|
2013-10-18 22:45:27 -07:00
|
|
|
if (other.hasRelay()) {
|
|
|
|
setRelay(other.getRelay());
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
if (!other.destinations_.isEmpty()) {
|
|
|
|
if (destinations_.isEmpty()) {
|
|
|
|
destinations_ = other.destinations_;
|
2013-10-18 22:45:27 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000008);
|
2013-09-08 18:19:05 -07:00
|
|
|
} else {
|
|
|
|
ensureDestinationsIsMutable();
|
|
|
|
destinations_.addAll(other.destinations_);
|
|
|
|
}
|
|
|
|
onChanged();
|
|
|
|
}
|
|
|
|
if (other.hasTimestamp()) {
|
|
|
|
setTimestamp(other.getTimestamp());
|
|
|
|
}
|
|
|
|
if (other.hasMessage()) {
|
|
|
|
setMessage(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 {
|
|
|
|
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
|
|
|
com.google.protobuf.UnknownFieldSet.newBuilder(
|
|
|
|
this.getUnknownFields());
|
|
|
|
while (true) {
|
|
|
|
int tag = input.readTag();
|
|
|
|
switch (tag) {
|
|
|
|
case 0:
|
|
|
|
this.setUnknownFields(unknownFields.build());
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
default: {
|
|
|
|
if (!parseUnknownField(input, unknownFields,
|
|
|
|
extensionRegistry, tag)) {
|
|
|
|
this.setUnknownFields(unknownFields.build());
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 8: {
|
|
|
|
bitField0_ |= 0x00000001;
|
|
|
|
type_ = input.readUInt32();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 18: {
|
|
|
|
bitField0_ |= 0x00000002;
|
|
|
|
source_ = input.readBytes();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 26: {
|
2013-10-18 22:45:27 -07:00
|
|
|
bitField0_ |= 0x00000004;
|
|
|
|
relay_ = input.readBytes();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 34: {
|
2013-09-08 18:19:05 -07:00
|
|
|
ensureDestinationsIsMutable();
|
|
|
|
destinations_.add(input.readBytes());
|
|
|
|
break;
|
|
|
|
}
|
2013-10-18 22:45:27 -07:00
|
|
|
case 40: {
|
|
|
|
bitField0_ |= 0x00000010;
|
2013-09-08 18:19:05 -07:00
|
|
|
timestamp_ = input.readUInt64();
|
|
|
|
break;
|
|
|
|
}
|
2013-10-18 22:45:27 -07:00
|
|
|
case 50: {
|
|
|
|
bitField0_ |= 0x00000020;
|
2013-09-08 18:19:05 -07:00
|
|
|
message_ = input.readBytes();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private int bitField0_;
|
|
|
|
|
|
|
|
// optional uint32 type = 1;
|
|
|
|
private int type_ ;
|
|
|
|
public boolean hasType() {
|
|
|
|
return ((bitField0_ & 0x00000001) == 0x00000001);
|
|
|
|
}
|
|
|
|
public int getType() {
|
|
|
|
return type_;
|
|
|
|
}
|
|
|
|
public Builder setType(int value) {
|
|
|
|
bitField0_ |= 0x00000001;
|
|
|
|
type_ = value;
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder clearType() {
|
|
|
|
bitField0_ = (bitField0_ & ~0x00000001);
|
|
|
|
type_ = 0;
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
// optional string source = 2;
|
|
|
|
private java.lang.Object source_ = "";
|
|
|
|
public boolean hasSource() {
|
|
|
|
return ((bitField0_ & 0x00000002) == 0x00000002);
|
|
|
|
}
|
|
|
|
public String getSource() {
|
|
|
|
java.lang.Object ref = source_;
|
|
|
|
if (!(ref instanceof String)) {
|
|
|
|
String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
|
|
|
|
source_ = s;
|
|
|
|
return s;
|
|
|
|
} else {
|
|
|
|
return (String) ref;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public Builder setSource(String value) {
|
|
|
|
if (value == null) {
|
|
|
|
throw new NullPointerException();
|
|
|
|
}
|
|
|
|
bitField0_ |= 0x00000002;
|
|
|
|
source_ = value;
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder clearSource() {
|
|
|
|
bitField0_ = (bitField0_ & ~0x00000002);
|
|
|
|
source_ = getDefaultInstance().getSource();
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
void setSource(com.google.protobuf.ByteString value) {
|
|
|
|
bitField0_ |= 0x00000002;
|
|
|
|
source_ = value;
|
|
|
|
onChanged();
|
|
|
|
}
|
|
|
|
|
2013-10-18 22:45:27 -07:00
|
|
|
// optional string relay = 3;
|
|
|
|
private java.lang.Object relay_ = "";
|
|
|
|
public boolean hasRelay() {
|
|
|
|
return ((bitField0_ & 0x00000004) == 0x00000004);
|
|
|
|
}
|
|
|
|
public String getRelay() {
|
|
|
|
java.lang.Object ref = relay_;
|
|
|
|
if (!(ref instanceof String)) {
|
|
|
|
String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
|
|
|
|
relay_ = s;
|
|
|
|
return s;
|
|
|
|
} else {
|
|
|
|
return (String) ref;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public Builder setRelay(String value) {
|
|
|
|
if (value == null) {
|
|
|
|
throw new NullPointerException();
|
|
|
|
}
|
|
|
|
bitField0_ |= 0x00000004;
|
|
|
|
relay_ = value;
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder clearRelay() {
|
|
|
|
bitField0_ = (bitField0_ & ~0x00000004);
|
|
|
|
relay_ = getDefaultInstance().getRelay();
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
void setRelay(com.google.protobuf.ByteString value) {
|
|
|
|
bitField0_ |= 0x00000004;
|
|
|
|
relay_ = value;
|
|
|
|
onChanged();
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated string destinations = 4;
|
2013-09-08 18:19:05 -07:00
|
|
|
private com.google.protobuf.LazyStringList destinations_ = com.google.protobuf.LazyStringArrayList.EMPTY;
|
|
|
|
private void ensureDestinationsIsMutable() {
|
2013-10-18 22:45:27 -07:00
|
|
|
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
|
2013-09-08 18:19:05 -07:00
|
|
|
destinations_ = new com.google.protobuf.LazyStringArrayList(destinations_);
|
2013-10-18 22:45:27 -07:00
|
|
|
bitField0_ |= 0x00000008;
|
2013-09-08 18:19:05 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
public java.util.List<String>
|
|
|
|
getDestinationsList() {
|
|
|
|
return java.util.Collections.unmodifiableList(destinations_);
|
|
|
|
}
|
|
|
|
public int getDestinationsCount() {
|
|
|
|
return destinations_.size();
|
|
|
|
}
|
|
|
|
public String getDestinations(int index) {
|
|
|
|
return destinations_.get(index);
|
|
|
|
}
|
|
|
|
public Builder setDestinations(
|
|
|
|
int index, String value) {
|
|
|
|
if (value == null) {
|
|
|
|
throw new NullPointerException();
|
|
|
|
}
|
|
|
|
ensureDestinationsIsMutable();
|
|
|
|
destinations_.set(index, value);
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder addDestinations(String value) {
|
|
|
|
if (value == null) {
|
|
|
|
throw new NullPointerException();
|
|
|
|
}
|
|
|
|
ensureDestinationsIsMutable();
|
|
|
|
destinations_.add(value);
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder addAllDestinations(
|
|
|
|
java.lang.Iterable<String> values) {
|
|
|
|
ensureDestinationsIsMutable();
|
|
|
|
super.addAll(values, destinations_);
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder clearDestinations() {
|
|
|
|
destinations_ = com.google.protobuf.LazyStringArrayList.EMPTY;
|
2013-10-18 22:45:27 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000008);
|
2013-09-08 18:19:05 -07:00
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
void addDestinations(com.google.protobuf.ByteString value) {
|
|
|
|
ensureDestinationsIsMutable();
|
|
|
|
destinations_.add(value);
|
|
|
|
onChanged();
|
|
|
|
}
|
|
|
|
|
2013-10-18 22:45:27 -07:00
|
|
|
// optional uint64 timestamp = 5;
|
2013-09-08 18:19:05 -07:00
|
|
|
private long timestamp_ ;
|
|
|
|
public boolean hasTimestamp() {
|
2013-10-18 22:45:27 -07:00
|
|
|
return ((bitField0_ & 0x00000010) == 0x00000010);
|
2013-09-08 18:19:05 -07:00
|
|
|
}
|
|
|
|
public long getTimestamp() {
|
|
|
|
return timestamp_;
|
|
|
|
}
|
|
|
|
public Builder setTimestamp(long value) {
|
2013-10-18 22:45:27 -07:00
|
|
|
bitField0_ |= 0x00000010;
|
2013-09-08 18:19:05 -07:00
|
|
|
timestamp_ = value;
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder clearTimestamp() {
|
2013-10-18 22:45:27 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000010);
|
2013-09-08 18:19:05 -07:00
|
|
|
timestamp_ = 0L;
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2013-10-18 22:45:27 -07:00
|
|
|
// optional bytes message = 6;
|
2013-09-08 18:19:05 -07:00
|
|
|
private com.google.protobuf.ByteString message_ = com.google.protobuf.ByteString.EMPTY;
|
|
|
|
public boolean hasMessage() {
|
2013-10-18 22:45:27 -07:00
|
|
|
return ((bitField0_ & 0x00000020) == 0x00000020);
|
2013-09-08 18:19:05 -07:00
|
|
|
}
|
|
|
|
public com.google.protobuf.ByteString getMessage() {
|
|
|
|
return message_;
|
|
|
|
}
|
|
|
|
public Builder setMessage(com.google.protobuf.ByteString value) {
|
|
|
|
if (value == null) {
|
|
|
|
throw new NullPointerException();
|
|
|
|
}
|
2013-10-18 22:45:27 -07:00
|
|
|
bitField0_ |= 0x00000020;
|
2013-09-08 18:19:05 -07:00
|
|
|
message_ = value;
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder clearMessage() {
|
2013-10-18 22:45:27 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000020);
|
2013-09-08 18:19:05 -07:00
|
|
|
message_ = getDefaultInstance().getMessage();
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
// @@protoc_insertion_point(builder_scope:textsecure.IncomingPushMessageSignal)
|
|
|
|
}
|
|
|
|
|
|
|
|
static {
|
|
|
|
defaultInstance = new IncomingPushMessageSignal(true);
|
|
|
|
defaultInstance.initFields();
|
|
|
|
}
|
|
|
|
|
|
|
|
// @@protoc_insertion_point(class_scope:textsecure.IncomingPushMessageSignal)
|
|
|
|
}
|
|
|
|
|
|
|
|
public interface PushMessageContentOrBuilder
|
|
|
|
extends com.google.protobuf.MessageOrBuilder {
|
2013-08-29 17:01:30 -07:00
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
// optional string body = 1;
|
|
|
|
boolean hasBody();
|
|
|
|
String getBody();
|
|
|
|
|
|
|
|
// repeated .textsecure.PushMessageContent.AttachmentPointer attachments = 2;
|
|
|
|
java.util.List<org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer>
|
2013-08-29 17:01:30 -07:00
|
|
|
getAttachmentsList();
|
2013-09-08 18:19:05 -07:00
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer getAttachments(int index);
|
2013-08-29 17:01:30 -07:00
|
|
|
int getAttachmentsCount();
|
2013-09-08 18:19:05 -07:00
|
|
|
java.util.List<? extends org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointerOrBuilder>
|
2013-08-29 17:01:30 -07:00
|
|
|
getAttachmentsOrBuilderList();
|
2013-09-08 18:19:05 -07:00
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointerOrBuilder getAttachmentsOrBuilder(
|
2013-08-29 17:01:30 -07:00
|
|
|
int index);
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static final class PushMessageContent extends
|
2013-08-29 17:01:30 -07:00
|
|
|
com.google.protobuf.GeneratedMessage
|
2013-09-08 18:19:05 -07:00
|
|
|
implements PushMessageContentOrBuilder {
|
|
|
|
// Use PushMessageContent.newBuilder() to construct.
|
|
|
|
private PushMessageContent(Builder builder) {
|
2013-08-29 17:01:30 -07:00
|
|
|
super(builder);
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
private PushMessageContent(boolean noInit) {}
|
2013-08-29 17:01:30 -07:00
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
private static final PushMessageContent defaultInstance;
|
|
|
|
public static PushMessageContent getDefaultInstance() {
|
2013-08-29 17:01:30 -07:00
|
|
|
return defaultInstance;
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
public PushMessageContent getDefaultInstanceForType() {
|
2013-08-29 17:01:30 -07:00
|
|
|
return defaultInstance;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final com.google.protobuf.Descriptors.Descriptor
|
|
|
|
getDescriptor() {
|
2013-09-08 18:19:05 -07:00
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.internal_static_textsecure_PushMessageContent_descriptor;
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
|
|
|
internalGetFieldAccessorTable() {
|
2013-09-08 18:19:05 -07:00
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.internal_static_textsecure_PushMessageContent_fieldAccessorTable;
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public interface AttachmentPointerOrBuilder
|
|
|
|
extends com.google.protobuf.MessageOrBuilder {
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
// optional fixed64 id = 1;
|
|
|
|
boolean hasId();
|
|
|
|
long getId();
|
|
|
|
|
|
|
|
// optional string contentType = 2;
|
2013-08-29 17:01:30 -07:00
|
|
|
boolean hasContentType();
|
|
|
|
String getContentType();
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
// optional bytes key = 3;
|
2013-08-29 17:01:30 -07:00
|
|
|
boolean hasKey();
|
2013-09-08 18:19:05 -07:00
|
|
|
com.google.protobuf.ByteString getKey();
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
public static final class AttachmentPointer extends
|
|
|
|
com.google.protobuf.GeneratedMessage
|
|
|
|
implements AttachmentPointerOrBuilder {
|
|
|
|
// Use AttachmentPointer.newBuilder() to construct.
|
|
|
|
private AttachmentPointer(Builder builder) {
|
|
|
|
super(builder);
|
|
|
|
}
|
|
|
|
private AttachmentPointer(boolean noInit) {}
|
|
|
|
|
|
|
|
private static final AttachmentPointer defaultInstance;
|
|
|
|
public static AttachmentPointer getDefaultInstance() {
|
|
|
|
return defaultInstance;
|
|
|
|
}
|
|
|
|
|
|
|
|
public AttachmentPointer getDefaultInstanceForType() {
|
|
|
|
return defaultInstance;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final com.google.protobuf.Descriptors.Descriptor
|
|
|
|
getDescriptor() {
|
2013-09-08 18:19:05 -07:00
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.internal_static_textsecure_PushMessageContent_AttachmentPointer_descriptor;
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
|
|
|
internalGetFieldAccessorTable() {
|
2013-09-08 18:19:05 -07:00
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.internal_static_textsecure_PushMessageContent_AttachmentPointer_fieldAccessorTable;
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
private int bitField0_;
|
2013-09-08 18:19:05 -07:00
|
|
|
// optional fixed64 id = 1;
|
|
|
|
public static final int ID_FIELD_NUMBER = 1;
|
|
|
|
private long id_;
|
|
|
|
public boolean hasId() {
|
|
|
|
return ((bitField0_ & 0x00000001) == 0x00000001);
|
|
|
|
}
|
|
|
|
public long getId() {
|
|
|
|
return id_;
|
|
|
|
}
|
|
|
|
|
|
|
|
// optional string contentType = 2;
|
|
|
|
public static final int CONTENTTYPE_FIELD_NUMBER = 2;
|
2013-08-29 17:01:30 -07:00
|
|
|
private java.lang.Object contentType_;
|
|
|
|
public boolean hasContentType() {
|
2013-09-08 18:19:05 -07:00
|
|
|
return ((bitField0_ & 0x00000002) == 0x00000002);
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
public String getContentType() {
|
|
|
|
java.lang.Object ref = contentType_;
|
|
|
|
if (ref instanceof String) {
|
|
|
|
return (String) ref;
|
|
|
|
} else {
|
|
|
|
com.google.protobuf.ByteString bs =
|
|
|
|
(com.google.protobuf.ByteString) ref;
|
|
|
|
String s = bs.toStringUtf8();
|
|
|
|
if (com.google.protobuf.Internal.isValidUtf8(bs)) {
|
|
|
|
contentType_ = s;
|
|
|
|
}
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
private com.google.protobuf.ByteString getContentTypeBytes() {
|
|
|
|
java.lang.Object ref = contentType_;
|
|
|
|
if (ref instanceof String) {
|
|
|
|
com.google.protobuf.ByteString b =
|
|
|
|
com.google.protobuf.ByteString.copyFromUtf8((String) ref);
|
|
|
|
contentType_ = b;
|
|
|
|
return b;
|
|
|
|
} else {
|
|
|
|
return (com.google.protobuf.ByteString) ref;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
// optional bytes key = 3;
|
|
|
|
public static final int KEY_FIELD_NUMBER = 3;
|
|
|
|
private com.google.protobuf.ByteString key_;
|
2013-08-29 17:01:30 -07:00
|
|
|
public boolean hasKey() {
|
2013-09-08 18:19:05 -07:00
|
|
|
return ((bitField0_ & 0x00000004) == 0x00000004);
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public com.google.protobuf.ByteString getKey() {
|
|
|
|
return key_;
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
private void initFields() {
|
2013-09-08 18:19:05 -07:00
|
|
|
id_ = 0L;
|
2013-08-29 17:01:30 -07:00
|
|
|
contentType_ = "";
|
2013-09-08 18:19:05 -07:00
|
|
|
key_ = com.google.protobuf.ByteString.EMPTY;
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
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)) {
|
2013-09-08 18:19:05 -07:00
|
|
|
output.writeFixed64(1, id_);
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
2013-09-08 18:19:05 -07:00
|
|
|
output.writeBytes(2, getContentTypeBytes());
|
|
|
|
}
|
|
|
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
|
|
|
output.writeBytes(3, key_);
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
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
|
2013-09-08 18:19:05 -07:00
|
|
|
.computeFixed64Size(1, id_);
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
|
|
|
size += com.google.protobuf.CodedOutputStream
|
2013-09-08 18:19:05 -07:00
|
|
|
.computeBytesSize(2, getContentTypeBytes());
|
|
|
|
}
|
|
|
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
|
|
|
size += com.google.protobuf.CodedOutputStream
|
|
|
|
.computeBytesSize(3, key_);
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer parseFrom(
|
2013-08-29 17:01:30 -07:00
|
|
|
com.google.protobuf.ByteString data)
|
|
|
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
|
return newBuilder().mergeFrom(data).buildParsed();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer parseFrom(
|
2013-08-29 17:01:30 -07:00
|
|
|
com.google.protobuf.ByteString data,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
|
return newBuilder().mergeFrom(data, extensionRegistry)
|
|
|
|
.buildParsed();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer parseFrom(byte[] data)
|
2013-08-29 17:01:30 -07:00
|
|
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
|
return newBuilder().mergeFrom(data).buildParsed();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer parseFrom(
|
2013-08-29 17:01:30 -07:00
|
|
|
byte[] data,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
|
return newBuilder().mergeFrom(data, extensionRegistry)
|
|
|
|
.buildParsed();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer parseFrom(java.io.InputStream input)
|
2013-08-29 17:01:30 -07:00
|
|
|
throws java.io.IOException {
|
|
|
|
return newBuilder().mergeFrom(input).buildParsed();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer parseFrom(
|
2013-08-29 17:01:30 -07:00
|
|
|
java.io.InputStream input,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws java.io.IOException {
|
|
|
|
return newBuilder().mergeFrom(input, extensionRegistry)
|
|
|
|
.buildParsed();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer parseDelimitedFrom(java.io.InputStream input)
|
2013-08-29 17:01:30 -07:00
|
|
|
throws java.io.IOException {
|
|
|
|
Builder builder = newBuilder();
|
|
|
|
if (builder.mergeDelimitedFrom(input)) {
|
|
|
|
return builder.buildParsed();
|
|
|
|
} else {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer parseDelimitedFrom(
|
2013-08-29 17:01:30 -07:00
|
|
|
java.io.InputStream input,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws java.io.IOException {
|
|
|
|
Builder builder = newBuilder();
|
|
|
|
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
|
|
|
|
return builder.buildParsed();
|
|
|
|
} else {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer parseFrom(
|
2013-08-29 17:01:30 -07:00
|
|
|
com.google.protobuf.CodedInputStream input)
|
|
|
|
throws java.io.IOException {
|
|
|
|
return newBuilder().mergeFrom(input).buildParsed();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer parseFrom(
|
2013-08-29 17:01:30 -07:00
|
|
|
com.google.protobuf.CodedInputStream input,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws java.io.IOException {
|
|
|
|
return newBuilder().mergeFrom(input, extensionRegistry)
|
|
|
|
.buildParsed();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Builder newBuilder() { return Builder.create(); }
|
|
|
|
public Builder newBuilderForType() { return newBuilder(); }
|
2013-09-08 18:19:05 -07:00
|
|
|
public static Builder newBuilder(org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer prototype) {
|
2013-08-29 17:01:30 -07:00
|
|
|
return newBuilder().mergeFrom(prototype);
|
|
|
|
}
|
|
|
|
public Builder toBuilder() { return newBuilder(this); }
|
|
|
|
|
|
|
|
@java.lang.Override
|
|
|
|
protected Builder newBuilderForType(
|
|
|
|
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
|
|
|
|
Builder builder = new Builder(parent);
|
|
|
|
return builder;
|
|
|
|
}
|
|
|
|
public static final class Builder extends
|
|
|
|
com.google.protobuf.GeneratedMessage.Builder<Builder>
|
2013-09-08 18:19:05 -07:00
|
|
|
implements org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointerOrBuilder {
|
2013-08-29 17:01:30 -07:00
|
|
|
public static final com.google.protobuf.Descriptors.Descriptor
|
|
|
|
getDescriptor() {
|
2013-09-08 18:19:05 -07:00
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.internal_static_textsecure_PushMessageContent_AttachmentPointer_descriptor;
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
|
|
|
internalGetFieldAccessorTable() {
|
2013-09-08 18:19:05 -07:00
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.internal_static_textsecure_PushMessageContent_AttachmentPointer_fieldAccessorTable;
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
// Construct using org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.newBuilder()
|
2013-08-29 17:01:30 -07:00
|
|
|
private Builder() {
|
|
|
|
maybeForceBuilderInitialization();
|
|
|
|
}
|
|
|
|
|
|
|
|
private Builder(BuilderParent parent) {
|
|
|
|
super(parent);
|
|
|
|
maybeForceBuilderInitialization();
|
|
|
|
}
|
|
|
|
private void maybeForceBuilderInitialization() {
|
|
|
|
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
private static Builder create() {
|
|
|
|
return new Builder();
|
|
|
|
}
|
|
|
|
|
|
|
|
public Builder clear() {
|
|
|
|
super.clear();
|
2013-09-08 18:19:05 -07:00
|
|
|
id_ = 0L;
|
2013-08-29 17:01:30 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000001);
|
2013-09-08 18:19:05 -07:00
|
|
|
contentType_ = "";
|
2013-08-29 17:01:30 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000002);
|
2013-09-08 18:19:05 -07:00
|
|
|
key_ = com.google.protobuf.ByteString.EMPTY;
|
|
|
|
bitField0_ = (bitField0_ & ~0x00000004);
|
2013-08-29 17:01:30 -07:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Builder clone() {
|
|
|
|
return create().mergeFrom(buildPartial());
|
|
|
|
}
|
|
|
|
|
|
|
|
public com.google.protobuf.Descriptors.Descriptor
|
|
|
|
getDescriptorForType() {
|
2013-09-08 18:19:05 -07:00
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.getDescriptor();
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
public org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer getDefaultInstanceForType() {
|
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.getDefaultInstance();
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
public org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer build() {
|
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer result = buildPartial();
|
2013-08-29 17:01:30 -07:00
|
|
|
if (!result.isInitialized()) {
|
|
|
|
throw newUninitializedMessageException(result);
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
private org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer buildParsed()
|
2013-08-29 17:01:30 -07:00
|
|
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
2013-09-08 18:19:05 -07:00
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer result = buildPartial();
|
2013-08-29 17:01:30 -07:00
|
|
|
if (!result.isInitialized()) {
|
|
|
|
throw newUninitializedMessageException(
|
|
|
|
result).asInvalidProtocolBufferException();
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
public org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer buildPartial() {
|
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer result = new org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer(this);
|
2013-08-29 17:01:30 -07:00
|
|
|
int from_bitField0_ = bitField0_;
|
|
|
|
int to_bitField0_ = 0;
|
|
|
|
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
|
|
|
to_bitField0_ |= 0x00000001;
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
result.id_ = id_;
|
2013-08-29 17:01:30 -07:00
|
|
|
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
|
|
|
|
to_bitField0_ |= 0x00000002;
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
result.contentType_ = contentType_;
|
|
|
|
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
|
|
|
to_bitField0_ |= 0x00000004;
|
|
|
|
}
|
2013-08-29 17:01:30 -07:00
|
|
|
result.key_ = key_;
|
|
|
|
result.bitField0_ = to_bitField0_;
|
|
|
|
onBuilt();
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Builder mergeFrom(com.google.protobuf.Message other) {
|
2013-09-08 18:19:05 -07:00
|
|
|
if (other instanceof org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer) {
|
|
|
|
return mergeFrom((org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer)other);
|
2013-08-29 17:01:30 -07:00
|
|
|
} else {
|
|
|
|
super.mergeFrom(other);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
public Builder mergeFrom(org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer other) {
|
|
|
|
if (other == org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.getDefaultInstance()) return this;
|
|
|
|
if (other.hasId()) {
|
|
|
|
setId(other.getId());
|
|
|
|
}
|
2013-08-29 17:01:30 -07:00
|
|
|
if (other.hasContentType()) {
|
|
|
|
setContentType(other.getContentType());
|
|
|
|
}
|
|
|
|
if (other.hasKey()) {
|
|
|
|
setKey(other.getKey());
|
|
|
|
}
|
|
|
|
this.mergeUnknownFields(other.getUnknownFields());
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean isInitialized() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Builder mergeFrom(
|
|
|
|
com.google.protobuf.CodedInputStream input,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws java.io.IOException {
|
|
|
|
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
|
|
|
com.google.protobuf.UnknownFieldSet.newBuilder(
|
|
|
|
this.getUnknownFields());
|
|
|
|
while (true) {
|
|
|
|
int tag = input.readTag();
|
|
|
|
switch (tag) {
|
|
|
|
case 0:
|
|
|
|
this.setUnknownFields(unknownFields.build());
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
default: {
|
|
|
|
if (!parseUnknownField(input, unknownFields,
|
|
|
|
extensionRegistry, tag)) {
|
|
|
|
this.setUnknownFields(unknownFields.build());
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
case 9: {
|
2013-08-29 17:01:30 -07:00
|
|
|
bitField0_ |= 0x00000001;
|
2013-09-08 18:19:05 -07:00
|
|
|
id_ = input.readFixed64();
|
2013-08-29 17:01:30 -07:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 18: {
|
|
|
|
bitField0_ |= 0x00000002;
|
2013-09-08 18:19:05 -07:00
|
|
|
contentType_ = input.readBytes();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 26: {
|
|
|
|
bitField0_ |= 0x00000004;
|
2013-08-29 17:01:30 -07:00
|
|
|
key_ = input.readBytes();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private int bitField0_;
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
// optional fixed64 id = 1;
|
|
|
|
private long id_ ;
|
|
|
|
public boolean hasId() {
|
|
|
|
return ((bitField0_ & 0x00000001) == 0x00000001);
|
|
|
|
}
|
|
|
|
public long getId() {
|
|
|
|
return id_;
|
|
|
|
}
|
|
|
|
public Builder setId(long value) {
|
|
|
|
bitField0_ |= 0x00000001;
|
|
|
|
id_ = value;
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder clearId() {
|
|
|
|
bitField0_ = (bitField0_ & ~0x00000001);
|
|
|
|
id_ = 0L;
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
// optional string contentType = 2;
|
2013-08-29 17:01:30 -07:00
|
|
|
private java.lang.Object contentType_ = "";
|
|
|
|
public boolean hasContentType() {
|
2013-09-08 18:19:05 -07:00
|
|
|
return ((bitField0_ & 0x00000002) == 0x00000002);
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
public String getContentType() {
|
|
|
|
java.lang.Object ref = contentType_;
|
|
|
|
if (!(ref instanceof String)) {
|
|
|
|
String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
|
|
|
|
contentType_ = s;
|
|
|
|
return s;
|
|
|
|
} else {
|
|
|
|
return (String) ref;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public Builder setContentType(String value) {
|
|
|
|
if (value == null) {
|
|
|
|
throw new NullPointerException();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
bitField0_ |= 0x00000002;
|
2013-08-29 17:01:30 -07:00
|
|
|
contentType_ = value;
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder clearContentType() {
|
2013-09-08 18:19:05 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000002);
|
2013-08-29 17:01:30 -07:00
|
|
|
contentType_ = getDefaultInstance().getContentType();
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
void setContentType(com.google.protobuf.ByteString value) {
|
2013-09-08 18:19:05 -07:00
|
|
|
bitField0_ |= 0x00000002;
|
2013-08-29 17:01:30 -07:00
|
|
|
contentType_ = value;
|
|
|
|
onChanged();
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
// optional bytes key = 3;
|
|
|
|
private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY;
|
2013-08-29 17:01:30 -07:00
|
|
|
public boolean hasKey() {
|
2013-09-08 18:19:05 -07:00
|
|
|
return ((bitField0_ & 0x00000004) == 0x00000004);
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public com.google.protobuf.ByteString getKey() {
|
|
|
|
return key_;
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public Builder setKey(com.google.protobuf.ByteString value) {
|
2013-08-29 17:01:30 -07:00
|
|
|
if (value == null) {
|
|
|
|
throw new NullPointerException();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
bitField0_ |= 0x00000004;
|
2013-08-29 17:01:30 -07:00
|
|
|
key_ = value;
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder clearKey() {
|
2013-09-08 18:19:05 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000004);
|
2013-08-29 17:01:30 -07:00
|
|
|
key_ = getDefaultInstance().getKey();
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
// @@protoc_insertion_point(builder_scope:textsecure.PushMessageContent.AttachmentPointer)
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static {
|
|
|
|
defaultInstance = new AttachmentPointer(true);
|
|
|
|
defaultInstance.initFields();
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
// @@protoc_insertion_point(class_scope:textsecure.PushMessageContent.AttachmentPointer)
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
private int bitField0_;
|
2013-09-08 18:19:05 -07:00
|
|
|
// optional string body = 1;
|
|
|
|
public static final int BODY_FIELD_NUMBER = 1;
|
|
|
|
private java.lang.Object body_;
|
|
|
|
public boolean hasBody() {
|
2013-08-29 17:01:30 -07:00
|
|
|
return ((bitField0_ & 0x00000001) == 0x00000001);
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public String getBody() {
|
|
|
|
java.lang.Object ref = body_;
|
2013-08-29 17:01:30 -07:00
|
|
|
if (ref instanceof String) {
|
|
|
|
return (String) ref;
|
|
|
|
} else {
|
|
|
|
com.google.protobuf.ByteString bs =
|
|
|
|
(com.google.protobuf.ByteString) ref;
|
|
|
|
String s = bs.toStringUtf8();
|
|
|
|
if (com.google.protobuf.Internal.isValidUtf8(bs)) {
|
2013-09-08 18:19:05 -07:00
|
|
|
body_ = s;
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
private com.google.protobuf.ByteString getBodyBytes() {
|
|
|
|
java.lang.Object ref = body_;
|
2013-08-29 17:01:30 -07:00
|
|
|
if (ref instanceof String) {
|
|
|
|
com.google.protobuf.ByteString b =
|
|
|
|
com.google.protobuf.ByteString.copyFromUtf8((String) ref);
|
2013-09-08 18:19:05 -07:00
|
|
|
body_ = b;
|
2013-08-29 17:01:30 -07:00
|
|
|
return b;
|
|
|
|
} else {
|
|
|
|
return (com.google.protobuf.ByteString) ref;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
// repeated .textsecure.PushMessageContent.AttachmentPointer attachments = 2;
|
|
|
|
public static final int ATTACHMENTS_FIELD_NUMBER = 2;
|
|
|
|
private java.util.List<org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer> attachments_;
|
|
|
|
public java.util.List<org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer> getAttachmentsList() {
|
2013-08-29 17:01:30 -07:00
|
|
|
return attachments_;
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public java.util.List<? extends org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointerOrBuilder>
|
2013-08-29 17:01:30 -07:00
|
|
|
getAttachmentsOrBuilderList() {
|
|
|
|
return attachments_;
|
|
|
|
}
|
|
|
|
public int getAttachmentsCount() {
|
|
|
|
return attachments_.size();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer getAttachments(int index) {
|
2013-08-29 17:01:30 -07:00
|
|
|
return attachments_.get(index);
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointerOrBuilder getAttachmentsOrBuilder(
|
2013-08-29 17:01:30 -07:00
|
|
|
int index) {
|
|
|
|
return attachments_.get(index);
|
|
|
|
}
|
|
|
|
|
|
|
|
private void initFields() {
|
2013-09-08 18:19:05 -07:00
|
|
|
body_ = "";
|
2013-08-29 17:01:30 -07:00
|
|
|
attachments_ = 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;
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
|
|
|
|
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
|
|
|
throws java.io.IOException {
|
|
|
|
getSerializedSize();
|
|
|
|
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
|
|
|
output.writeBytes(1, getBodyBytes());
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
for (int i = 0; i < attachments_.size(); i++) {
|
2013-09-08 18:19:05 -07:00
|
|
|
output.writeMessage(2, attachments_.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)) {
|
2013-08-29 17:01:30 -07:00
|
|
|
size += com.google.protobuf.CodedOutputStream
|
2013-09-08 18:19:05 -07:00
|
|
|
.computeBytesSize(1, getBodyBytes());
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
for (int i = 0; i < attachments_.size(); i++) {
|
2013-08-29 17:01:30 -07:00
|
|
|
size += com.google.protobuf.CodedOutputStream
|
2013-09-08 18:19:05 -07:00
|
|
|
.computeMessageSize(2, attachments_.get(i));
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent parseFrom(
|
2013-08-29 17:01:30 -07:00
|
|
|
com.google.protobuf.ByteString data)
|
|
|
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
|
return newBuilder().mergeFrom(data).buildParsed();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent parseFrom(
|
2013-08-29 17:01:30 -07:00
|
|
|
com.google.protobuf.ByteString data,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
|
return newBuilder().mergeFrom(data, extensionRegistry)
|
|
|
|
.buildParsed();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent parseFrom(byte[] data)
|
2013-08-29 17:01:30 -07:00
|
|
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
|
return newBuilder().mergeFrom(data).buildParsed();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent parseFrom(
|
2013-08-29 17:01:30 -07:00
|
|
|
byte[] data,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
|
|
|
return newBuilder().mergeFrom(data, extensionRegistry)
|
|
|
|
.buildParsed();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent parseFrom(java.io.InputStream input)
|
2013-08-29 17:01:30 -07:00
|
|
|
throws java.io.IOException {
|
|
|
|
return newBuilder().mergeFrom(input).buildParsed();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent parseFrom(
|
2013-08-29 17:01:30 -07:00
|
|
|
java.io.InputStream input,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws java.io.IOException {
|
|
|
|
return newBuilder().mergeFrom(input, extensionRegistry)
|
|
|
|
.buildParsed();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent parseDelimitedFrom(java.io.InputStream input)
|
2013-08-29 17:01:30 -07:00
|
|
|
throws java.io.IOException {
|
|
|
|
Builder builder = newBuilder();
|
|
|
|
if (builder.mergeDelimitedFrom(input)) {
|
|
|
|
return builder.buildParsed();
|
|
|
|
} else {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent parseDelimitedFrom(
|
2013-08-29 17:01:30 -07:00
|
|
|
java.io.InputStream input,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws java.io.IOException {
|
|
|
|
Builder builder = newBuilder();
|
|
|
|
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
|
|
|
|
return builder.buildParsed();
|
|
|
|
} else {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent parseFrom(
|
2013-08-29 17:01:30 -07:00
|
|
|
com.google.protobuf.CodedInputStream input)
|
|
|
|
throws java.io.IOException {
|
|
|
|
return newBuilder().mergeFrom(input).buildParsed();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public static org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent parseFrom(
|
2013-08-29 17:01:30 -07:00
|
|
|
com.google.protobuf.CodedInputStream input,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws java.io.IOException {
|
|
|
|
return newBuilder().mergeFrom(input, extensionRegistry)
|
|
|
|
.buildParsed();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Builder newBuilder() { return Builder.create(); }
|
|
|
|
public Builder newBuilderForType() { return newBuilder(); }
|
2013-09-08 18:19:05 -07:00
|
|
|
public static Builder newBuilder(org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent prototype) {
|
2013-08-29 17:01:30 -07:00
|
|
|
return newBuilder().mergeFrom(prototype);
|
|
|
|
}
|
|
|
|
public Builder toBuilder() { return newBuilder(this); }
|
|
|
|
|
|
|
|
@java.lang.Override
|
|
|
|
protected Builder newBuilderForType(
|
|
|
|
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
|
|
|
|
Builder builder = new Builder(parent);
|
|
|
|
return builder;
|
|
|
|
}
|
|
|
|
public static final class Builder extends
|
|
|
|
com.google.protobuf.GeneratedMessage.Builder<Builder>
|
2013-09-08 18:19:05 -07:00
|
|
|
implements org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContentOrBuilder {
|
2013-08-29 17:01:30 -07:00
|
|
|
public static final com.google.protobuf.Descriptors.Descriptor
|
|
|
|
getDescriptor() {
|
2013-09-08 18:19:05 -07:00
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.internal_static_textsecure_PushMessageContent_descriptor;
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
|
|
|
internalGetFieldAccessorTable() {
|
2013-09-08 18:19:05 -07:00
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.internal_static_textsecure_PushMessageContent_fieldAccessorTable;
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
// Construct using org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.newBuilder()
|
2013-08-29 17:01:30 -07:00
|
|
|
private Builder() {
|
|
|
|
maybeForceBuilderInitialization();
|
|
|
|
}
|
|
|
|
|
|
|
|
private Builder(BuilderParent parent) {
|
|
|
|
super(parent);
|
|
|
|
maybeForceBuilderInitialization();
|
|
|
|
}
|
|
|
|
private void maybeForceBuilderInitialization() {
|
|
|
|
if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
|
|
|
|
getAttachmentsFieldBuilder();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
private static Builder create() {
|
|
|
|
return new Builder();
|
|
|
|
}
|
|
|
|
|
|
|
|
public Builder clear() {
|
|
|
|
super.clear();
|
2013-09-08 18:19:05 -07:00
|
|
|
body_ = "";
|
2013-08-29 17:01:30 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000001);
|
|
|
|
if (attachmentsBuilder_ == null) {
|
|
|
|
attachments_ = java.util.Collections.emptyList();
|
2013-09-08 18:19:05 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000002);
|
2013-08-29 17:01:30 -07:00
|
|
|
} else {
|
|
|
|
attachmentsBuilder_.clear();
|
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Builder clone() {
|
|
|
|
return create().mergeFrom(buildPartial());
|
|
|
|
}
|
|
|
|
|
|
|
|
public com.google.protobuf.Descriptors.Descriptor
|
|
|
|
getDescriptorForType() {
|
2013-09-08 18:19:05 -07:00
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.getDescriptor();
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
public org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent getDefaultInstanceForType() {
|
|
|
|
return org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.getDefaultInstance();
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
public org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent build() {
|
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent result = buildPartial();
|
2013-08-29 17:01:30 -07:00
|
|
|
if (!result.isInitialized()) {
|
|
|
|
throw newUninitializedMessageException(result);
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
private org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent buildParsed()
|
2013-08-29 17:01:30 -07:00
|
|
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
2013-09-08 18:19:05 -07:00
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent result = buildPartial();
|
2013-08-29 17:01:30 -07:00
|
|
|
if (!result.isInitialized()) {
|
|
|
|
throw newUninitializedMessageException(
|
|
|
|
result).asInvalidProtocolBufferException();
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
public org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent buildPartial() {
|
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent result = new org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent(this);
|
2013-08-29 17:01:30 -07:00
|
|
|
int from_bitField0_ = bitField0_;
|
|
|
|
int to_bitField0_ = 0;
|
|
|
|
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
|
|
|
to_bitField0_ |= 0x00000001;
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
result.body_ = body_;
|
2013-08-29 17:01:30 -07:00
|
|
|
if (attachmentsBuilder_ == null) {
|
2013-09-08 18:19:05 -07:00
|
|
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
2013-08-29 17:01:30 -07:00
|
|
|
attachments_ = java.util.Collections.unmodifiableList(attachments_);
|
2013-09-08 18:19:05 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000002);
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
result.attachments_ = attachments_;
|
|
|
|
} else {
|
|
|
|
result.attachments_ = attachmentsBuilder_.build();
|
|
|
|
}
|
|
|
|
result.bitField0_ = to_bitField0_;
|
|
|
|
onBuilt();
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Builder mergeFrom(com.google.protobuf.Message other) {
|
2013-09-08 18:19:05 -07:00
|
|
|
if (other instanceof org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent) {
|
|
|
|
return mergeFrom((org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent)other);
|
2013-08-29 17:01:30 -07:00
|
|
|
} else {
|
|
|
|
super.mergeFrom(other);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
public Builder mergeFrom(org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent other) {
|
|
|
|
if (other == org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.getDefaultInstance()) return this;
|
|
|
|
if (other.hasBody()) {
|
|
|
|
setBody(other.getBody());
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
if (attachmentsBuilder_ == null) {
|
|
|
|
if (!other.attachments_.isEmpty()) {
|
|
|
|
if (attachments_.isEmpty()) {
|
|
|
|
attachments_ = other.attachments_;
|
2013-09-08 18:19:05 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000002);
|
2013-08-29 17:01:30 -07:00
|
|
|
} else {
|
|
|
|
ensureAttachmentsIsMutable();
|
|
|
|
attachments_.addAll(other.attachments_);
|
|
|
|
}
|
|
|
|
onChanged();
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (!other.attachments_.isEmpty()) {
|
|
|
|
if (attachmentsBuilder_.isEmpty()) {
|
|
|
|
attachmentsBuilder_.dispose();
|
|
|
|
attachmentsBuilder_ = null;
|
|
|
|
attachments_ = other.attachments_;
|
2013-09-08 18:19:05 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000002);
|
2013-08-29 17:01:30 -07:00
|
|
|
attachmentsBuilder_ =
|
|
|
|
com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
|
|
|
|
getAttachmentsFieldBuilder() : null;
|
|
|
|
} else {
|
|
|
|
attachmentsBuilder_.addAllMessages(other.attachments_);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.mergeUnknownFields(other.getUnknownFields());
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean isInitialized() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Builder mergeFrom(
|
|
|
|
com.google.protobuf.CodedInputStream input,
|
|
|
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
|
|
throws java.io.IOException {
|
|
|
|
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
|
|
|
com.google.protobuf.UnknownFieldSet.newBuilder(
|
|
|
|
this.getUnknownFields());
|
|
|
|
while (true) {
|
|
|
|
int tag = input.readTag();
|
|
|
|
switch (tag) {
|
|
|
|
case 0:
|
|
|
|
this.setUnknownFields(unknownFields.build());
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
default: {
|
|
|
|
if (!parseUnknownField(input, unknownFields,
|
|
|
|
extensionRegistry, tag)) {
|
|
|
|
this.setUnknownFields(unknownFields.build());
|
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
case 10: {
|
2013-08-29 17:01:30 -07:00
|
|
|
bitField0_ |= 0x00000001;
|
2013-09-08 18:19:05 -07:00
|
|
|
body_ = input.readBytes();
|
2013-08-29 17:01:30 -07:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 18: {
|
2013-09-08 18:19:05 -07:00
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.Builder subBuilder = org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.newBuilder();
|
2013-08-29 17:01:30 -07:00
|
|
|
input.readMessage(subBuilder, extensionRegistry);
|
|
|
|
addAttachments(subBuilder.buildPartial());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private int bitField0_;
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
// optional string body = 1;
|
|
|
|
private java.lang.Object body_ = "";
|
|
|
|
public boolean hasBody() {
|
2013-08-29 17:01:30 -07:00
|
|
|
return ((bitField0_ & 0x00000001) == 0x00000001);
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public String getBody() {
|
|
|
|
java.lang.Object ref = body_;
|
2013-08-29 17:01:30 -07:00
|
|
|
if (!(ref instanceof String)) {
|
|
|
|
String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
|
2013-09-08 18:19:05 -07:00
|
|
|
body_ = s;
|
2013-08-29 17:01:30 -07:00
|
|
|
return s;
|
|
|
|
} else {
|
|
|
|
return (String) ref;
|
|
|
|
}
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public Builder setBody(String value) {
|
2013-08-29 17:01:30 -07:00
|
|
|
if (value == null) {
|
|
|
|
throw new NullPointerException();
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
bitField0_ |= 0x00000001;
|
|
|
|
body_ = value;
|
2013-08-29 17:01:30 -07:00
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public Builder clearBody() {
|
|
|
|
bitField0_ = (bitField0_ & ~0x00000001);
|
|
|
|
body_ = getDefaultInstance().getBody();
|
2013-08-29 17:01:30 -07:00
|
|
|
onChanged();
|
|
|
|
return this;
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
void setBody(com.google.protobuf.ByteString value) {
|
|
|
|
bitField0_ |= 0x00000001;
|
|
|
|
body_ = value;
|
2013-08-29 17:01:30 -07:00
|
|
|
onChanged();
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
// repeated .textsecure.PushMessageContent.AttachmentPointer attachments = 2;
|
|
|
|
private java.util.List<org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer> attachments_ =
|
2013-08-29 17:01:30 -07:00
|
|
|
java.util.Collections.emptyList();
|
|
|
|
private void ensureAttachmentsIsMutable() {
|
2013-09-08 18:19:05 -07:00
|
|
|
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
|
|
|
|
attachments_ = new java.util.ArrayList<org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer>(attachments_);
|
|
|
|
bitField0_ |= 0x00000002;
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private com.google.protobuf.RepeatedFieldBuilder<
|
2013-09-08 18:19:05 -07:00
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer, org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.Builder, org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointerOrBuilder> attachmentsBuilder_;
|
2013-08-29 17:01:30 -07:00
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
public java.util.List<org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer> getAttachmentsList() {
|
2013-08-29 17:01:30 -07:00
|
|
|
if (attachmentsBuilder_ == null) {
|
|
|
|
return java.util.Collections.unmodifiableList(attachments_);
|
|
|
|
} else {
|
|
|
|
return attachmentsBuilder_.getMessageList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public int getAttachmentsCount() {
|
|
|
|
if (attachmentsBuilder_ == null) {
|
|
|
|
return attachments_.size();
|
|
|
|
} else {
|
|
|
|
return attachmentsBuilder_.getCount();
|
|
|
|
}
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer getAttachments(int index) {
|
2013-08-29 17:01:30 -07:00
|
|
|
if (attachmentsBuilder_ == null) {
|
|
|
|
return attachments_.get(index);
|
|
|
|
} else {
|
|
|
|
return attachmentsBuilder_.getMessage(index);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public Builder setAttachments(
|
2013-09-08 18:19:05 -07:00
|
|
|
int index, org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer value) {
|
2013-08-29 17:01:30 -07:00
|
|
|
if (attachmentsBuilder_ == null) {
|
|
|
|
if (value == null) {
|
|
|
|
throw new NullPointerException();
|
|
|
|
}
|
|
|
|
ensureAttachmentsIsMutable();
|
|
|
|
attachments_.set(index, value);
|
|
|
|
onChanged();
|
|
|
|
} else {
|
|
|
|
attachmentsBuilder_.setMessage(index, value);
|
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder setAttachments(
|
2013-09-08 18:19:05 -07:00
|
|
|
int index, org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.Builder builderForValue) {
|
2013-08-29 17:01:30 -07:00
|
|
|
if (attachmentsBuilder_ == null) {
|
|
|
|
ensureAttachmentsIsMutable();
|
|
|
|
attachments_.set(index, builderForValue.build());
|
|
|
|
onChanged();
|
|
|
|
} else {
|
|
|
|
attachmentsBuilder_.setMessage(index, builderForValue.build());
|
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public Builder addAttachments(org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer value) {
|
2013-08-29 17:01:30 -07:00
|
|
|
if (attachmentsBuilder_ == null) {
|
|
|
|
if (value == null) {
|
|
|
|
throw new NullPointerException();
|
|
|
|
}
|
|
|
|
ensureAttachmentsIsMutable();
|
|
|
|
attachments_.add(value);
|
|
|
|
onChanged();
|
|
|
|
} else {
|
|
|
|
attachmentsBuilder_.addMessage(value);
|
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder addAttachments(
|
2013-09-08 18:19:05 -07:00
|
|
|
int index, org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer value) {
|
2013-08-29 17:01:30 -07:00
|
|
|
if (attachmentsBuilder_ == null) {
|
|
|
|
if (value == null) {
|
|
|
|
throw new NullPointerException();
|
|
|
|
}
|
|
|
|
ensureAttachmentsIsMutable();
|
|
|
|
attachments_.add(index, value);
|
|
|
|
onChanged();
|
|
|
|
} else {
|
|
|
|
attachmentsBuilder_.addMessage(index, value);
|
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder addAttachments(
|
2013-09-08 18:19:05 -07:00
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.Builder builderForValue) {
|
2013-08-29 17:01:30 -07:00
|
|
|
if (attachmentsBuilder_ == null) {
|
|
|
|
ensureAttachmentsIsMutable();
|
|
|
|
attachments_.add(builderForValue.build());
|
|
|
|
onChanged();
|
|
|
|
} else {
|
|
|
|
attachmentsBuilder_.addMessage(builderForValue.build());
|
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder addAttachments(
|
2013-09-08 18:19:05 -07:00
|
|
|
int index, org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.Builder builderForValue) {
|
2013-08-29 17:01:30 -07:00
|
|
|
if (attachmentsBuilder_ == null) {
|
|
|
|
ensureAttachmentsIsMutable();
|
|
|
|
attachments_.add(index, builderForValue.build());
|
|
|
|
onChanged();
|
|
|
|
} else {
|
|
|
|
attachmentsBuilder_.addMessage(index, builderForValue.build());
|
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder addAllAttachments(
|
2013-09-08 18:19:05 -07:00
|
|
|
java.lang.Iterable<? extends org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer> values) {
|
2013-08-29 17:01:30 -07:00
|
|
|
if (attachmentsBuilder_ == null) {
|
|
|
|
ensureAttachmentsIsMutable();
|
|
|
|
super.addAll(values, attachments_);
|
|
|
|
onChanged();
|
|
|
|
} else {
|
|
|
|
attachmentsBuilder_.addAllMessages(values);
|
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder clearAttachments() {
|
|
|
|
if (attachmentsBuilder_ == null) {
|
|
|
|
attachments_ = java.util.Collections.emptyList();
|
2013-09-08 18:19:05 -07:00
|
|
|
bitField0_ = (bitField0_ & ~0x00000002);
|
2013-08-29 17:01:30 -07:00
|
|
|
onChanged();
|
|
|
|
} else {
|
|
|
|
attachmentsBuilder_.clear();
|
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
public Builder removeAttachments(int index) {
|
|
|
|
if (attachmentsBuilder_ == null) {
|
|
|
|
ensureAttachmentsIsMutable();
|
|
|
|
attachments_.remove(index);
|
|
|
|
onChanged();
|
|
|
|
} else {
|
|
|
|
attachmentsBuilder_.remove(index);
|
|
|
|
}
|
|
|
|
return this;
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.Builder getAttachmentsBuilder(
|
2013-08-29 17:01:30 -07:00
|
|
|
int index) {
|
|
|
|
return getAttachmentsFieldBuilder().getBuilder(index);
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointerOrBuilder getAttachmentsOrBuilder(
|
2013-08-29 17:01:30 -07:00
|
|
|
int index) {
|
|
|
|
if (attachmentsBuilder_ == null) {
|
|
|
|
return attachments_.get(index); } else {
|
|
|
|
return attachmentsBuilder_.getMessageOrBuilder(index);
|
|
|
|
}
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public java.util.List<? extends org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointerOrBuilder>
|
2013-08-29 17:01:30 -07:00
|
|
|
getAttachmentsOrBuilderList() {
|
|
|
|
if (attachmentsBuilder_ != null) {
|
|
|
|
return attachmentsBuilder_.getMessageOrBuilderList();
|
|
|
|
} else {
|
|
|
|
return java.util.Collections.unmodifiableList(attachments_);
|
|
|
|
}
|
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.Builder addAttachmentsBuilder() {
|
2013-08-29 17:01:30 -07:00
|
|
|
return getAttachmentsFieldBuilder().addBuilder(
|
2013-09-08 18:19:05 -07:00
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.getDefaultInstance());
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.Builder addAttachmentsBuilder(
|
2013-08-29 17:01:30 -07:00
|
|
|
int index) {
|
|
|
|
return getAttachmentsFieldBuilder().addBuilder(
|
2013-09-08 18:19:05 -07:00
|
|
|
index, org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.getDefaultInstance());
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
2013-09-08 18:19:05 -07:00
|
|
|
public java.util.List<org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.Builder>
|
2013-08-29 17:01:30 -07:00
|
|
|
getAttachmentsBuilderList() {
|
|
|
|
return getAttachmentsFieldBuilder().getBuilderList();
|
|
|
|
}
|
|
|
|
private com.google.protobuf.RepeatedFieldBuilder<
|
2013-09-08 18:19:05 -07:00
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer, org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.Builder, org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointerOrBuilder>
|
2013-08-29 17:01:30 -07:00
|
|
|
getAttachmentsFieldBuilder() {
|
|
|
|
if (attachmentsBuilder_ == null) {
|
|
|
|
attachmentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
|
2013-09-08 18:19:05 -07:00
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer, org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.Builder, org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointerOrBuilder>(
|
2013-08-29 17:01:30 -07:00
|
|
|
attachments_,
|
2013-09-08 18:19:05 -07:00
|
|
|
((bitField0_ & 0x00000002) == 0x00000002),
|
2013-08-29 17:01:30 -07:00
|
|
|
getParentForChildren(),
|
|
|
|
isClean());
|
|
|
|
attachments_ = null;
|
|
|
|
}
|
|
|
|
return attachmentsBuilder_;
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
// @@protoc_insertion_point(builder_scope:textsecure.PushMessageContent)
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static {
|
2013-09-08 18:19:05 -07:00
|
|
|
defaultInstance = new PushMessageContent(true);
|
2013-08-29 17:01:30 -07:00
|
|
|
defaultInstance.initFields();
|
|
|
|
}
|
|
|
|
|
2013-09-08 18:19:05 -07:00
|
|
|
// @@protoc_insertion_point(class_scope:textsecure.PushMessageContent)
|
2013-08-29 17:01:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
private static com.google.protobuf.Descriptors.Descriptor
|
|
|
|
internal_static_textsecure_IncomingPushMessageSignal_descriptor;
|
|
|
|
private static
|
|
|
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
|
|
|
internal_static_textsecure_IncomingPushMessageSignal_fieldAccessorTable;
|
|
|
|
private static com.google.protobuf.Descriptors.Descriptor
|
2013-09-08 18:19:05 -07:00
|
|
|
internal_static_textsecure_PushMessageContent_descriptor;
|
2013-08-29 17:01:30 -07:00
|
|
|
private static
|
|
|
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
2013-09-08 18:19:05 -07:00
|
|
|
internal_static_textsecure_PushMessageContent_fieldAccessorTable;
|
|
|
|
private static com.google.protobuf.Descriptors.Descriptor
|
|
|
|
internal_static_textsecure_PushMessageContent_AttachmentPointer_descriptor;
|
|
|
|
private static
|
|
|
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable
|
|
|
|
internal_static_textsecure_PushMessageContent_AttachmentPointer_fieldAccessorTable;
|
2013-08-29 17:01:30 -07:00
|
|
|
|
|
|
|
public static com.google.protobuf.Descriptors.FileDescriptor
|
|
|
|
getDescriptor() {
|
|
|
|
return descriptor;
|
|
|
|
}
|
|
|
|
private static com.google.protobuf.Descriptors.FileDescriptor
|
|
|
|
descriptor;
|
|
|
|
static {
|
|
|
|
java.lang.String[] descriptorData = {
|
|
|
|
"\n\037IncomingPushMessageSignal.proto\022\ntexts" +
|
2013-10-18 22:45:27 -07:00
|
|
|
"ecure\"\202\001\n\031IncomingPushMessageSignal\022\014\n\004t" +
|
|
|
|
"ype\030\001 \001(\r\022\016\n\006source\030\002 \001(\t\022\r\n\005relay\030\003 \001(\t" +
|
|
|
|
"\022\024\n\014destinations\030\004 \003(\t\022\021\n\ttimestamp\030\005 \001(" +
|
|
|
|
"\004\022\017\n\007message\030\006 \001(\014\"\254\001\n\022PushMessageConten" +
|
|
|
|
"t\022\014\n\004body\030\001 \001(\t\022E\n\013attachments\030\002 \003(\01320.t" +
|
|
|
|
"extsecure.PushMessageContent.AttachmentP" +
|
|
|
|
"ointer\032A\n\021AttachmentPointer\022\n\n\002id\030\001 \001(\006\022" +
|
|
|
|
"\023\n\013contentType\030\002 \001(\t\022\013\n\003key\030\003 \001(\014B7\n\"org" +
|
|
|
|
".whispersystems.textsecure.pushB\021PushMes",
|
|
|
|
"sageProtos"
|
2013-08-29 17:01:30 -07:00
|
|
|
};
|
|
|
|
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_IncomingPushMessageSignal_descriptor =
|
|
|
|
getDescriptor().getMessageTypes().get(0);
|
|
|
|
internal_static_textsecure_IncomingPushMessageSignal_fieldAccessorTable = new
|
|
|
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
|
|
|
internal_static_textsecure_IncomingPushMessageSignal_descriptor,
|
2013-10-18 22:45:27 -07:00
|
|
|
new java.lang.String[] { "Type", "Source", "Relay", "Destinations", "Timestamp", "Message", },
|
2013-08-29 17:01:30 -07:00
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal.class,
|
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.IncomingPushMessageSignal.Builder.class);
|
2013-09-08 18:19:05 -07:00
|
|
|
internal_static_textsecure_PushMessageContent_descriptor =
|
|
|
|
getDescriptor().getMessageTypes().get(1);
|
|
|
|
internal_static_textsecure_PushMessageContent_fieldAccessorTable = new
|
|
|
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
|
|
|
internal_static_textsecure_PushMessageContent_descriptor,
|
|
|
|
new java.lang.String[] { "Body", "Attachments", },
|
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.class,
|
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.Builder.class);
|
|
|
|
internal_static_textsecure_PushMessageContent_AttachmentPointer_descriptor =
|
|
|
|
internal_static_textsecure_PushMessageContent_descriptor.getNestedTypes().get(0);
|
|
|
|
internal_static_textsecure_PushMessageContent_AttachmentPointer_fieldAccessorTable = new
|
2013-08-29 17:01:30 -07:00
|
|
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
2013-09-08 18:19:05 -07:00
|
|
|
internal_static_textsecure_PushMessageContent_AttachmentPointer_descriptor,
|
|
|
|
new java.lang.String[] { "Id", "ContentType", "Key", },
|
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.class,
|
|
|
|
org.whispersystems.textsecure.push.PushMessageProtos.PushMessageContent.AttachmentPointer.Builder.class);
|
2013-08-29 17:01:30 -07:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
com.google.protobuf.Descriptors.FileDescriptor
|
|
|
|
.internalBuildGeneratedFileFrom(descriptorData,
|
|
|
|
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
|
|
|
}, assigner);
|
|
|
|
}
|
|
|
|
|
|
|
|
// @@protoc_insertion_point(outer_class_scope)
|
|
|
|
}
|