- implements org.whispersystems.textsecuregcm.entities.MessageProtos.EnvelopeOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_Envelope_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_Envelope_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.whispersystems.textsecuregcm.entities.MessageProtos.Envelope.class, org.whispersystems.textsecuregcm.entities.MessageProtos.Envelope.Builder.class);
- }
-
- // Construct using org.whispersystems.textsecuregcm.entities.MessageProtos.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.textsecuregcm.entities.MessageProtos.Envelope.Type.UNKNOWN;
- bitField0_ = (bitField0_ & ~0x00000001);
- source_ = "";
- bitField0_ = (bitField0_ & ~0x00000002);
- sourceUuid_ = "";
- bitField0_ = (bitField0_ & ~0x00000004);
- sourceDevice_ = 0;
- bitField0_ = (bitField0_ & ~0x00000008);
- relay_ = "";
- bitField0_ = (bitField0_ & ~0x00000010);
- timestamp_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000020);
- legacyMessage_ = com.google.protobuf.ByteString.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000040);
- content_ = com.google.protobuf.ByteString.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000080);
- serverGuid_ = "";
- bitField0_ = (bitField0_ & ~0x00000100);
- serverTimestamp_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000200);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_Envelope_descriptor;
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.Envelope getDefaultInstanceForType() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.Envelope.getDefaultInstance();
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.Envelope build() {
- org.whispersystems.textsecuregcm.entities.MessageProtos.Envelope result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.Envelope buildPartial() {
- org.whispersystems.textsecuregcm.entities.MessageProtos.Envelope result = new org.whispersystems.textsecuregcm.entities.MessageProtos.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.sourceUuid_ = sourceUuid_;
- if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
- to_bitField0_ |= 0x00000008;
- }
- result.sourceDevice_ = sourceDevice_;
- if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
- to_bitField0_ |= 0x00000010;
- }
- result.relay_ = relay_;
- if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
- to_bitField0_ |= 0x00000020;
- }
- result.timestamp_ = timestamp_;
- if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
- to_bitField0_ |= 0x00000040;
- }
- result.legacyMessage_ = legacyMessage_;
- if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
- to_bitField0_ |= 0x00000080;
- }
- result.content_ = content_;
- if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
- to_bitField0_ |= 0x00000100;
- }
- result.serverGuid_ = serverGuid_;
- if (((from_bitField0_ & 0x00000200) == 0x00000200)) {
- to_bitField0_ |= 0x00000200;
- }
- result.serverTimestamp_ = serverTimestamp_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.whispersystems.textsecuregcm.entities.MessageProtos.Envelope) {
- return mergeFrom((org.whispersystems.textsecuregcm.entities.MessageProtos.Envelope)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.whispersystems.textsecuregcm.entities.MessageProtos.Envelope other) {
- if (other == org.whispersystems.textsecuregcm.entities.MessageProtos.Envelope.getDefaultInstance()) return this;
- if (other.hasType()) {
- setType(other.getType());
- }
- if (other.hasSource()) {
- bitField0_ |= 0x00000002;
- source_ = other.source_;
- onChanged();
- }
- if (other.hasSourceUuid()) {
- bitField0_ |= 0x00000004;
- sourceUuid_ = other.sourceUuid_;
- onChanged();
- }
- if (other.hasSourceDevice()) {
- setSourceDevice(other.getSourceDevice());
- }
- if (other.hasRelay()) {
- bitField0_ |= 0x00000010;
- relay_ = other.relay_;
- onChanged();
- }
- if (other.hasTimestamp()) {
- setTimestamp(other.getTimestamp());
- }
- if (other.hasLegacyMessage()) {
- setLegacyMessage(other.getLegacyMessage());
- }
- if (other.hasContent()) {
- setContent(other.getContent());
- }
- if (other.hasServerGuid()) {
- bitField0_ |= 0x00000100;
- serverGuid_ = other.serverGuid_;
- onChanged();
- }
- if (other.hasServerTimestamp()) {
- setServerTimestamp(other.getServerTimestamp());
- }
- 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.textsecuregcm.entities.MessageProtos.Envelope parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.whispersystems.textsecuregcm.entities.MessageProtos.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.textsecuregcm.entities.MessageProtos.Envelope.Type type_ = org.whispersystems.textsecuregcm.entities.MessageProtos.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.textsecuregcm.entities.MessageProtos.Envelope.Type getType() {
- return type_;
- }
- /**
- * optional .textsecure.Envelope.Type type = 1;
- */
- public Builder setType(org.whispersystems.textsecuregcm.entities.MessageProtos.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.textsecuregcm.entities.MessageProtos.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 string sourceUuid = 11;
- private java.lang.Object sourceUuid_ = "";
- /**
- * optional string sourceUuid = 11;
- */
- public boolean hasSourceUuid() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * optional string sourceUuid = 11;
- */
- public java.lang.String getSourceUuid() {
- java.lang.Object ref = sourceUuid_;
- if (!(ref instanceof java.lang.String)) {
- java.lang.String s = ((com.google.protobuf.ByteString) ref)
- .toStringUtf8();
- sourceUuid_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * optional string sourceUuid = 11;
- */
- public com.google.protobuf.ByteString
- getSourceUuidBytes() {
- java.lang.Object ref = sourceUuid_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- sourceUuid_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string sourceUuid = 11;
- */
- public Builder setSourceUuid(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- sourceUuid_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string sourceUuid = 11;
- */
- public Builder clearSourceUuid() {
- bitField0_ = (bitField0_ & ~0x00000004);
- sourceUuid_ = getDefaultInstance().getSourceUuid();
- onChanged();
- return this;
- }
- /**
- * optional string sourceUuid = 11;
- */
- public Builder setSourceUuidBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- sourceUuid_ = value;
- onChanged();
- return this;
- }
-
- // optional uint32 sourceDevice = 7;
- private int sourceDevice_ ;
- /**
- * optional uint32 sourceDevice = 7;
- */
- public boolean hasSourceDevice() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- /**
- * optional uint32 sourceDevice = 7;
- */
- public int getSourceDevice() {
- return sourceDevice_;
- }
- /**
- * optional uint32 sourceDevice = 7;
- */
- public Builder setSourceDevice(int value) {
- bitField0_ |= 0x00000008;
- sourceDevice_ = value;
- onChanged();
- return this;
- }
- /**
- * optional uint32 sourceDevice = 7;
- */
- public Builder clearSourceDevice() {
- bitField0_ = (bitField0_ & ~0x00000008);
- sourceDevice_ = 0;
- onChanged();
- return this;
- }
-
- // optional string relay = 3;
- private java.lang.Object relay_ = "";
- /**
- * optional string relay = 3;
- */
- public boolean hasRelay() {
- return ((bitField0_ & 0x00000010) == 0x00000010);
- }
- /**
- * 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_ |= 0x00000010;
- relay_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string relay = 3;
- */
- public Builder clearRelay() {
- bitField0_ = (bitField0_ & ~0x00000010);
- 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_ |= 0x00000010;
- relay_ = value;
- onChanged();
- return this;
- }
-
- // optional uint64 timestamp = 5;
- private long timestamp_ ;
- /**
- * optional uint64 timestamp = 5;
- */
- public boolean hasTimestamp() {
- return ((bitField0_ & 0x00000020) == 0x00000020);
- }
- /**
- * optional uint64 timestamp = 5;
- */
- public long getTimestamp() {
- return timestamp_;
- }
- /**
- * optional uint64 timestamp = 5;
- */
- public Builder setTimestamp(long value) {
- bitField0_ |= 0x00000020;
- timestamp_ = value;
- onChanged();
- return this;
- }
- /**
- * optional uint64 timestamp = 5;
- */
- public Builder clearTimestamp() {
- bitField0_ = (bitField0_ & ~0x00000020);
- 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 XXX -- Remove after 10/01/15
- *
- */
- public boolean hasLegacyMessage() {
- return ((bitField0_ & 0x00000040) == 0x00000040);
- }
- /**
- * optional bytes legacyMessage = 6;
- *
- *
- * Contains an encrypted DataMessage XXX -- Remove after 10/01/15
- *
- */
- public com.google.protobuf.ByteString getLegacyMessage() {
- return legacyMessage_;
- }
- /**
- * optional bytes legacyMessage = 6;
- *
- *
- * Contains an encrypted DataMessage XXX -- Remove after 10/01/15
- *
- */
- public Builder setLegacyMessage(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000040;
- legacyMessage_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes legacyMessage = 6;
- *
- *
- * Contains an encrypted DataMessage XXX -- Remove after 10/01/15
- *
- */
- public Builder clearLegacyMessage() {
- bitField0_ = (bitField0_ & ~0x00000040);
- 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_ & 0x00000080) == 0x00000080);
- }
- /**
- * 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_ |= 0x00000080;
- content_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes content = 8;
- *
- *
- * Contains an encrypted Content
- *
- */
- public Builder clearContent() {
- bitField0_ = (bitField0_ & ~0x00000080);
- content_ = getDefaultInstance().getContent();
- onChanged();
- return this;
- }
-
- // optional string serverGuid = 9;
- private java.lang.Object serverGuid_ = "";
- /**
- * optional string serverGuid = 9;
- */
- public boolean hasServerGuid() {
- return ((bitField0_ & 0x00000100) == 0x00000100);
- }
- /**
- * optional string serverGuid = 9;
- */
- public java.lang.String getServerGuid() {
- java.lang.Object ref = serverGuid_;
- if (!(ref instanceof java.lang.String)) {
- java.lang.String s = ((com.google.protobuf.ByteString) ref)
- .toStringUtf8();
- serverGuid_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * optional string serverGuid = 9;
- */
- public com.google.protobuf.ByteString
- getServerGuidBytes() {
- java.lang.Object ref = serverGuid_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- serverGuid_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string serverGuid = 9;
- */
- public Builder setServerGuid(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000100;
- serverGuid_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string serverGuid = 9;
- */
- public Builder clearServerGuid() {
- bitField0_ = (bitField0_ & ~0x00000100);
- serverGuid_ = getDefaultInstance().getServerGuid();
- onChanged();
- return this;
- }
- /**
- * optional string serverGuid = 9;
- */
- public Builder setServerGuidBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000100;
- serverGuid_ = value;
- onChanged();
- return this;
- }
-
- // optional uint64 server_timestamp = 10;
- private long serverTimestamp_ ;
- /**
- * optional uint64 server_timestamp = 10;
- */
- public boolean hasServerTimestamp() {
- return ((bitField0_ & 0x00000200) == 0x00000200);
- }
- /**
- * optional uint64 server_timestamp = 10;
- */
- public long getServerTimestamp() {
- return serverTimestamp_;
- }
- /**
- * optional uint64 server_timestamp = 10;
- */
- public Builder setServerTimestamp(long value) {
- bitField0_ |= 0x00000200;
- serverTimestamp_ = value;
- onChanged();
- return this;
- }
- /**
- * optional uint64 server_timestamp = 10;
- */
- public Builder clearServerTimestamp() {
- bitField0_ = (bitField0_ & ~0x00000200);
- serverTimestamp_ = 0L;
- 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 ProvisioningUuidOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // optional string uuid = 1;
- /**
- * optional string uuid = 1;
- */
- boolean hasUuid();
- /**
- * optional string uuid = 1;
- */
- java.lang.String getUuid();
- /**
- * optional string uuid = 1;
- */
- com.google.protobuf.ByteString
- getUuidBytes();
- }
- /**
- * Protobuf type {@code textsecure.ProvisioningUuid}
- */
- public static final class ProvisioningUuid extends
- com.google.protobuf.GeneratedMessage
- implements ProvisioningUuidOrBuilder {
- // Use ProvisioningUuid.newBuilder() to construct.
- private ProvisioningUuid(com.google.protobuf.GeneratedMessage.Builder> builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private ProvisioningUuid(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
- private static final ProvisioningUuid defaultInstance;
- public static ProvisioningUuid getDefaultInstance() {
- return defaultInstance;
- }
-
- public ProvisioningUuid getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private ProvisioningUuid(
- 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;
- uuid_ = 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.textsecuregcm.entities.MessageProtos.internal_static_textsecure_ProvisioningUuid_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_ProvisioningUuid_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid.class, org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid.Builder.class);
- }
-
- public static com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- public ProvisioningUuid parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ProvisioningUuid(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- private int bitField0_;
- // optional string uuid = 1;
- public static final int UUID_FIELD_NUMBER = 1;
- private java.lang.Object uuid_;
- /**
- * optional string uuid = 1;
- */
- public boolean hasUuid() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional string uuid = 1;
- */
- public java.lang.String getUuid() {
- java.lang.Object ref = uuid_;
- 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()) {
- uuid_ = s;
- }
- return s;
- }
- }
- /**
- * optional string uuid = 1;
- */
- public com.google.protobuf.ByteString
- getUuidBytes() {
- java.lang.Object ref = uuid_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- uuid_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private void initFields() {
- uuid_ = "";
- }
- 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, getUuidBytes());
- }
- 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, getUuidBytes());
- }
- 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.textsecuregcm.entities.MessageProtos.ProvisioningUuid parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid 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.textsecuregcm.entities.MessageProtos.ProvisioningUuid parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid 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.textsecuregcm.entities.MessageProtos.ProvisioningUuid 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.ProvisioningUuid}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder
- implements org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuidOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_ProvisioningUuid_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_ProvisioningUuid_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid.class, org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid.Builder.class);
- }
-
- // Construct using org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid.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();
- uuid_ = "";
- bitField0_ = (bitField0_ & ~0x00000001);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_ProvisioningUuid_descriptor;
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid getDefaultInstanceForType() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid.getDefaultInstance();
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid build() {
- org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid buildPartial() {
- org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid result = new org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.uuid_ = uuid_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid) {
- return mergeFrom((org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid other) {
- if (other == org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid.getDefaultInstance()) return this;
- if (other.hasUuid()) {
- bitField0_ |= 0x00000001;
- uuid_ = other.uuid_;
- onChanged();
- }
- 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.textsecuregcm.entities.MessageProtos.ProvisioningUuid parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.whispersystems.textsecuregcm.entities.MessageProtos.ProvisioningUuid) e.getUnfinishedMessage();
- throw e;
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- // optional string uuid = 1;
- private java.lang.Object uuid_ = "";
- /**
- * optional string uuid = 1;
- */
- public boolean hasUuid() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional string uuid = 1;
- */
- public java.lang.String getUuid() {
- java.lang.Object ref = uuid_;
- if (!(ref instanceof java.lang.String)) {
- java.lang.String s = ((com.google.protobuf.ByteString) ref)
- .toStringUtf8();
- uuid_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * optional string uuid = 1;
- */
- public com.google.protobuf.ByteString
- getUuidBytes() {
- java.lang.Object ref = uuid_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- uuid_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string uuid = 1;
- */
- public Builder setUuid(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- uuid_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string uuid = 1;
- */
- public Builder clearUuid() {
- bitField0_ = (bitField0_ & ~0x00000001);
- uuid_ = getDefaultInstance().getUuid();
- onChanged();
- return this;
- }
- /**
- * optional string uuid = 1;
- */
- public Builder setUuidBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- uuid_ = value;
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:textsecure.ProvisioningUuid)
- }
-
- static {
- defaultInstance = new ProvisioningUuid(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:textsecure.ProvisioningUuid)
- }
-
- public interface ServerCertificateOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // optional bytes certificate = 1;
- /**
- * optional bytes certificate = 1;
- */
- boolean hasCertificate();
- /**
- * optional bytes certificate = 1;
- */
- com.google.protobuf.ByteString getCertificate();
-
- // optional bytes signature = 2;
- /**
- * optional bytes signature = 2;
- */
- boolean hasSignature();
- /**
- * optional bytes signature = 2;
- */
- com.google.protobuf.ByteString getSignature();
- }
- /**
- * Protobuf type {@code textsecure.ServerCertificate}
- */
- public static final class ServerCertificate extends
- com.google.protobuf.GeneratedMessage
- implements ServerCertificateOrBuilder {
- // Use ServerCertificate.newBuilder() to construct.
- private ServerCertificate(com.google.protobuf.GeneratedMessage.Builder> builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private ServerCertificate(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
- private static final ServerCertificate defaultInstance;
- public static ServerCertificate getDefaultInstance() {
- return defaultInstance;
- }
-
- public ServerCertificate getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private ServerCertificate(
- 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;
- certificate_ = input.readBytes();
- break;
- }
- case 18: {
- bitField0_ |= 0x00000002;
- signature_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_ServerCertificate_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_ServerCertificate_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.class, org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Builder.class);
- }
-
- public static com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- public ServerCertificate parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ServerCertificate(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public interface CertificateOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // optional uint32 id = 1;
- /**
- * optional uint32 id = 1;
- */
- boolean hasId();
- /**
- * optional uint32 id = 1;
- */
- int getId();
-
- // optional bytes key = 2;
- /**
- * optional bytes key = 2;
- */
- boolean hasKey();
- /**
- * optional bytes key = 2;
- */
- com.google.protobuf.ByteString getKey();
- }
- /**
- * Protobuf type {@code textsecure.ServerCertificate.Certificate}
- */
- public static final class Certificate extends
- com.google.protobuf.GeneratedMessage
- implements CertificateOrBuilder {
- // Use Certificate.newBuilder() to construct.
- private Certificate(com.google.protobuf.GeneratedMessage.Builder> builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private Certificate(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
- private static final Certificate defaultInstance;
- public static Certificate getDefaultInstance() {
- return defaultInstance;
- }
-
- public Certificate getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Certificate(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- initFields();
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- case 8: {
- bitField0_ |= 0x00000001;
- id_ = input.readUInt32();
- break;
- }
- case 18: {
- bitField0_ |= 0x00000002;
- key_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_ServerCertificate_Certificate_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_ServerCertificate_Certificate_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate.class, org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate.Builder.class);
- }
-
- public static com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- public Certificate parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Certificate(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- private int bitField0_;
- // optional uint32 id = 1;
- public static final int ID_FIELD_NUMBER = 1;
- private int id_;
- /**
- * optional uint32 id = 1;
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional uint32 id = 1;
- */
- public int getId() {
- return id_;
- }
-
- // optional bytes key = 2;
- public static final int KEY_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString key_;
- /**
- * optional bytes key = 2;
- */
- public boolean hasKey() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional bytes key = 2;
- */
- public com.google.protobuf.ByteString getKey() {
- return key_;
- }
-
- private void initFields() {
- id_ = 0;
- key_ = com.google.protobuf.ByteString.EMPTY;
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeUInt32(1, id_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(2, key_);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(1, id_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, key_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate 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.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate 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.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate 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.ServerCertificate.Certificate}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder
- implements org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.CertificateOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_ServerCertificate_Certificate_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_ServerCertificate_Certificate_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate.class, org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate.Builder.class);
- }
-
- // Construct using org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate.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_ = 0;
- bitField0_ = (bitField0_ & ~0x00000001);
- key_ = com.google.protobuf.ByteString.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000002);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_ServerCertificate_Certificate_descriptor;
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate getDefaultInstanceForType() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate.getDefaultInstance();
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate build() {
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate buildPartial() {
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate result = new org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate(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.key_ = key_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate) {
- return mergeFrom((org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate other) {
- if (other == org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate.getDefaultInstance()) return this;
- if (other.hasId()) {
- setId(other.getId());
- }
- 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 {
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Certificate) e.getUnfinishedMessage();
- throw e;
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- // optional uint32 id = 1;
- private int id_ ;
- /**
- * optional uint32 id = 1;
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional uint32 id = 1;
- */
- public int getId() {
- return id_;
- }
- /**
- * optional uint32 id = 1;
- */
- public Builder setId(int value) {
- bitField0_ |= 0x00000001;
- id_ = value;
- onChanged();
- return this;
- }
- /**
- * optional uint32 id = 1;
- */
- public Builder clearId() {
- bitField0_ = (bitField0_ & ~0x00000001);
- id_ = 0;
- onChanged();
- return this;
- }
-
- // optional bytes key = 2;
- private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes key = 2;
- */
- public boolean hasKey() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional bytes key = 2;
- */
- public com.google.protobuf.ByteString getKey() {
- return key_;
- }
- /**
- * optional bytes key = 2;
- */
- public Builder setKey(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- key_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes key = 2;
- */
- public Builder clearKey() {
- bitField0_ = (bitField0_ & ~0x00000002);
- key_ = getDefaultInstance().getKey();
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:textsecure.ServerCertificate.Certificate)
- }
-
- static {
- defaultInstance = new Certificate(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:textsecure.ServerCertificate.Certificate)
- }
-
- private int bitField0_;
- // optional bytes certificate = 1;
- public static final int CERTIFICATE_FIELD_NUMBER = 1;
- private com.google.protobuf.ByteString certificate_;
- /**
- * optional bytes certificate = 1;
- */
- public boolean hasCertificate() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional bytes certificate = 1;
- */
- public com.google.protobuf.ByteString getCertificate() {
- return certificate_;
- }
-
- // optional bytes signature = 2;
- public static final int SIGNATURE_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString signature_;
- /**
- * optional bytes signature = 2;
- */
- public boolean hasSignature() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional bytes signature = 2;
- */
- public com.google.protobuf.ByteString getSignature() {
- return signature_;
- }
-
- private void initFields() {
- certificate_ = com.google.protobuf.ByteString.EMPTY;
- signature_ = com.google.protobuf.ByteString.EMPTY;
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeBytes(1, certificate_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(2, signature_);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, certificate_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, signature_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate 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.textsecuregcm.entities.MessageProtos.ServerCertificate parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate 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.textsecuregcm.entities.MessageProtos.ServerCertificate 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.ServerCertificate}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder
- implements org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificateOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_ServerCertificate_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_ServerCertificate_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.class, org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Builder.class);
- }
-
- // Construct using org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.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();
- certificate_ = com.google.protobuf.ByteString.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000001);
- signature_ = com.google.protobuf.ByteString.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000002);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_ServerCertificate_descriptor;
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate getDefaultInstanceForType() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.getDefaultInstance();
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate build() {
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate buildPartial() {
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate result = new org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.certificate_ = certificate_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
- result.signature_ = signature_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate) {
- return mergeFrom((org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate other) {
- if (other == org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.getDefaultInstance()) return this;
- if (other.hasCertificate()) {
- setCertificate(other.getCertificate());
- }
- if (other.hasSignature()) {
- setSignature(other.getSignature());
- }
- 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.textsecuregcm.entities.MessageProtos.ServerCertificate parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate) e.getUnfinishedMessage();
- throw e;
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- // optional bytes certificate = 1;
- private com.google.protobuf.ByteString certificate_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes certificate = 1;
- */
- public boolean hasCertificate() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional bytes certificate = 1;
- */
- public com.google.protobuf.ByteString getCertificate() {
- return certificate_;
- }
- /**
- * optional bytes certificate = 1;
- */
- public Builder setCertificate(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- certificate_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes certificate = 1;
- */
- public Builder clearCertificate() {
- bitField0_ = (bitField0_ & ~0x00000001);
- certificate_ = getDefaultInstance().getCertificate();
- onChanged();
- return this;
- }
-
- // optional bytes signature = 2;
- private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes signature = 2;
- */
- public boolean hasSignature() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional bytes signature = 2;
- */
- public com.google.protobuf.ByteString getSignature() {
- return signature_;
- }
- /**
- * optional bytes signature = 2;
- */
- public Builder setSignature(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- signature_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes signature = 2;
- */
- public Builder clearSignature() {
- bitField0_ = (bitField0_ & ~0x00000002);
- signature_ = getDefaultInstance().getSignature();
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:textsecure.ServerCertificate)
- }
-
- static {
- defaultInstance = new ServerCertificate(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:textsecure.ServerCertificate)
- }
-
- public interface SenderCertificateOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // optional bytes certificate = 1;
- /**
- * optional bytes certificate = 1;
- */
- boolean hasCertificate();
- /**
- * optional bytes certificate = 1;
- */
- com.google.protobuf.ByteString getCertificate();
-
- // optional bytes signature = 2;
- /**
- * optional bytes signature = 2;
- */
- boolean hasSignature();
- /**
- * optional bytes signature = 2;
- */
- com.google.protobuf.ByteString getSignature();
- }
- /**
- * Protobuf type {@code textsecure.SenderCertificate}
- */
- public static final class SenderCertificate extends
- com.google.protobuf.GeneratedMessage
- implements SenderCertificateOrBuilder {
- // Use SenderCertificate.newBuilder() to construct.
- private SenderCertificate(com.google.protobuf.GeneratedMessage.Builder> builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private SenderCertificate(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
- private static final SenderCertificate defaultInstance;
- public static SenderCertificate getDefaultInstance() {
- return defaultInstance;
- }
-
- public SenderCertificate getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private SenderCertificate(
- 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;
- certificate_ = input.readBytes();
- break;
- }
- case 18: {
- bitField0_ |= 0x00000002;
- signature_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_SenderCertificate_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_SenderCertificate_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.class, org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Builder.class);
- }
-
- public static com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- public SenderCertificate parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new SenderCertificate(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- public interface CertificateOrBuilder
- 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 string senderUuid = 6;
- /**
- * optional string senderUuid = 6;
- */
- boolean hasSenderUuid();
- /**
- * optional string senderUuid = 6;
- */
- java.lang.String getSenderUuid();
- /**
- * optional string senderUuid = 6;
- */
- com.google.protobuf.ByteString
- getSenderUuidBytes();
-
- // optional uint32 senderDevice = 2;
- /**
- * optional uint32 senderDevice = 2;
- */
- boolean hasSenderDevice();
- /**
- * optional uint32 senderDevice = 2;
- */
- int getSenderDevice();
-
- // optional fixed64 expires = 3;
- /**
- * optional fixed64 expires = 3;
- */
- boolean hasExpires();
- /**
- * optional fixed64 expires = 3;
- */
- long getExpires();
-
- // optional bytes identityKey = 4;
- /**
- * optional bytes identityKey = 4;
- */
- boolean hasIdentityKey();
- /**
- * optional bytes identityKey = 4;
- */
- com.google.protobuf.ByteString getIdentityKey();
-
- // optional .textsecure.ServerCertificate signer = 5;
- /**
- * optional .textsecure.ServerCertificate signer = 5;
- */
- boolean hasSigner();
- /**
- * optional .textsecure.ServerCertificate signer = 5;
- */
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate getSigner();
- /**
- * optional .textsecure.ServerCertificate signer = 5;
- */
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificateOrBuilder getSignerOrBuilder();
- }
- /**
- * Protobuf type {@code textsecure.SenderCertificate.Certificate}
- */
- public static final class Certificate extends
- com.google.protobuf.GeneratedMessage
- implements CertificateOrBuilder {
- // Use Certificate.newBuilder() to construct.
- private Certificate(com.google.protobuf.GeneratedMessage.Builder> builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private Certificate(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
- private static final Certificate defaultInstance;
- public static Certificate getDefaultInstance() {
- return defaultInstance;
- }
-
- public Certificate getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Certificate(
- 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_ |= 0x00000004;
- senderDevice_ = input.readUInt32();
- break;
- }
- case 25: {
- bitField0_ |= 0x00000008;
- expires_ = input.readFixed64();
- break;
- }
- case 34: {
- bitField0_ |= 0x00000010;
- identityKey_ = input.readBytes();
- break;
- }
- case 42: {
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Builder subBuilder = null;
- if (((bitField0_ & 0x00000020) == 0x00000020)) {
- subBuilder = signer_.toBuilder();
- }
- signer_ = input.readMessage(org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.PARSER, extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(signer_);
- signer_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000020;
- break;
- }
- case 50: {
- bitField0_ |= 0x00000002;
- senderUuid_ = 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.textsecuregcm.entities.MessageProtos.internal_static_textsecure_SenderCertificate_Certificate_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_SenderCertificate_Certificate_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate.class, org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate.Builder.class);
- }
-
- public static com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- public Certificate parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Certificate(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 string senderUuid = 6;
- public static final int SENDERUUID_FIELD_NUMBER = 6;
- private java.lang.Object senderUuid_;
- /**
- * optional string senderUuid = 6;
- */
- public boolean hasSenderUuid() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional string senderUuid = 6;
- */
- public java.lang.String getSenderUuid() {
- java.lang.Object ref = senderUuid_;
- 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()) {
- senderUuid_ = s;
- }
- return s;
- }
- }
- /**
- * optional string senderUuid = 6;
- */
- public com.google.protobuf.ByteString
- getSenderUuidBytes() {
- java.lang.Object ref = senderUuid_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- senderUuid_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional uint32 senderDevice = 2;
- public static final int SENDERDEVICE_FIELD_NUMBER = 2;
- private int senderDevice_;
- /**
- * optional uint32 senderDevice = 2;
- */
- public boolean hasSenderDevice() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * optional uint32 senderDevice = 2;
- */
- public int getSenderDevice() {
- return senderDevice_;
- }
-
- // optional fixed64 expires = 3;
- public static final int EXPIRES_FIELD_NUMBER = 3;
- private long expires_;
- /**
- * optional fixed64 expires = 3;
- */
- public boolean hasExpires() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- /**
- * optional fixed64 expires = 3;
- */
- public long getExpires() {
- return expires_;
- }
-
- // optional bytes identityKey = 4;
- public static final int IDENTITYKEY_FIELD_NUMBER = 4;
- private com.google.protobuf.ByteString identityKey_;
- /**
- * optional bytes identityKey = 4;
- */
- public boolean hasIdentityKey() {
- return ((bitField0_ & 0x00000010) == 0x00000010);
- }
- /**
- * optional bytes identityKey = 4;
- */
- public com.google.protobuf.ByteString getIdentityKey() {
- return identityKey_;
- }
-
- // optional .textsecure.ServerCertificate signer = 5;
- public static final int SIGNER_FIELD_NUMBER = 5;
- private org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate signer_;
- /**
- * optional .textsecure.ServerCertificate signer = 5;
- */
- public boolean hasSigner() {
- return ((bitField0_ & 0x00000020) == 0x00000020);
- }
- /**
- * optional .textsecure.ServerCertificate signer = 5;
- */
- public org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate getSigner() {
- return signer_;
- }
- /**
- * optional .textsecure.ServerCertificate signer = 5;
- */
- public org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificateOrBuilder getSignerOrBuilder() {
- return signer_;
- }
-
- private void initFields() {
- sender_ = "";
- senderUuid_ = "";
- senderDevice_ = 0;
- expires_ = 0L;
- identityKey_ = com.google.protobuf.ByteString.EMPTY;
- signer_ = org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.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, getSenderBytes());
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeUInt32(2, senderDevice_);
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- output.writeFixed64(3, expires_);
- }
- if (((bitField0_ & 0x00000010) == 0x00000010)) {
- output.writeBytes(4, identityKey_);
- }
- if (((bitField0_ & 0x00000020) == 0x00000020)) {
- output.writeMessage(5, signer_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(6, getSenderUuidBytes());
- }
- 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_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(2, senderDevice_);
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- size += com.google.protobuf.CodedOutputStream
- .computeFixed64Size(3, expires_);
- }
- if (((bitField0_ & 0x00000010) == 0x00000010)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(4, identityKey_);
- }
- if (((bitField0_ & 0x00000020) == 0x00000020)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(5, signer_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(6, getSenderUuidBytes());
- }
- 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.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate 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.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate 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.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate 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.SenderCertificate.Certificate}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder
- implements org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.CertificateOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_SenderCertificate_Certificate_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_SenderCertificate_Certificate_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate.class, org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate.Builder.class);
- }
-
- // Construct using org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
- getSignerFieldBuilder();
- }
- }
- private static Builder create() {
- return new Builder();
- }
-
- public Builder clear() {
- super.clear();
- sender_ = "";
- bitField0_ = (bitField0_ & ~0x00000001);
- senderUuid_ = "";
- bitField0_ = (bitField0_ & ~0x00000002);
- senderDevice_ = 0;
- bitField0_ = (bitField0_ & ~0x00000004);
- expires_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000008);
- identityKey_ = com.google.protobuf.ByteString.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000010);
- if (signerBuilder_ == null) {
- signer_ = org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.getDefaultInstance();
- } else {
- signerBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000020);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_SenderCertificate_Certificate_descriptor;
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate getDefaultInstanceForType() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate.getDefaultInstance();
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate build() {
- org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate buildPartial() {
- org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate result = new org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate(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.senderUuid_ = senderUuid_;
- if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
- to_bitField0_ |= 0x00000004;
- }
- result.senderDevice_ = senderDevice_;
- if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
- to_bitField0_ |= 0x00000008;
- }
- result.expires_ = expires_;
- if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
- to_bitField0_ |= 0x00000010;
- }
- result.identityKey_ = identityKey_;
- if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
- to_bitField0_ |= 0x00000020;
- }
- if (signerBuilder_ == null) {
- result.signer_ = signer_;
- } else {
- result.signer_ = signerBuilder_.build();
- }
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate) {
- return mergeFrom((org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate other) {
- if (other == org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate.getDefaultInstance()) return this;
- if (other.hasSender()) {
- bitField0_ |= 0x00000001;
- sender_ = other.sender_;
- onChanged();
- }
- if (other.hasSenderUuid()) {
- bitField0_ |= 0x00000002;
- senderUuid_ = other.senderUuid_;
- onChanged();
- }
- if (other.hasSenderDevice()) {
- setSenderDevice(other.getSenderDevice());
- }
- if (other.hasExpires()) {
- setExpires(other.getExpires());
- }
- if (other.hasIdentityKey()) {
- setIdentityKey(other.getIdentityKey());
- }
- if (other.hasSigner()) {
- mergeSigner(other.getSigner());
- }
- 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.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Certificate) 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 string senderUuid = 6;
- private java.lang.Object senderUuid_ = "";
- /**
- * optional string senderUuid = 6;
- */
- public boolean hasSenderUuid() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional string senderUuid = 6;
- */
- public java.lang.String getSenderUuid() {
- java.lang.Object ref = senderUuid_;
- if (!(ref instanceof java.lang.String)) {
- java.lang.String s = ((com.google.protobuf.ByteString) ref)
- .toStringUtf8();
- senderUuid_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * optional string senderUuid = 6;
- */
- public com.google.protobuf.ByteString
- getSenderUuidBytes() {
- java.lang.Object ref = senderUuid_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- senderUuid_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string senderUuid = 6;
- */
- public Builder setSenderUuid(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- senderUuid_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string senderUuid = 6;
- */
- public Builder clearSenderUuid() {
- bitField0_ = (bitField0_ & ~0x00000002);
- senderUuid_ = getDefaultInstance().getSenderUuid();
- onChanged();
- return this;
- }
- /**
- * optional string senderUuid = 6;
- */
- public Builder setSenderUuidBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- senderUuid_ = value;
- onChanged();
- return this;
- }
-
- // optional uint32 senderDevice = 2;
- private int senderDevice_ ;
- /**
- * optional uint32 senderDevice = 2;
- */
- public boolean hasSenderDevice() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- /**
- * optional uint32 senderDevice = 2;
- */
- public int getSenderDevice() {
- return senderDevice_;
- }
- /**
- * optional uint32 senderDevice = 2;
- */
- public Builder setSenderDevice(int value) {
- bitField0_ |= 0x00000004;
- senderDevice_ = value;
- onChanged();
- return this;
- }
- /**
- * optional uint32 senderDevice = 2;
- */
- public Builder clearSenderDevice() {
- bitField0_ = (bitField0_ & ~0x00000004);
- senderDevice_ = 0;
- onChanged();
- return this;
- }
-
- // optional fixed64 expires = 3;
- private long expires_ ;
- /**
- * optional fixed64 expires = 3;
- */
- public boolean hasExpires() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- /**
- * optional fixed64 expires = 3;
- */
- public long getExpires() {
- return expires_;
- }
- /**
- * optional fixed64 expires = 3;
- */
- public Builder setExpires(long value) {
- bitField0_ |= 0x00000008;
- expires_ = value;
- onChanged();
- return this;
- }
- /**
- * optional fixed64 expires = 3;
- */
- public Builder clearExpires() {
- bitField0_ = (bitField0_ & ~0x00000008);
- expires_ = 0L;
- onChanged();
- return this;
- }
-
- // optional bytes identityKey = 4;
- private com.google.protobuf.ByteString identityKey_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes identityKey = 4;
- */
- public boolean hasIdentityKey() {
- return ((bitField0_ & 0x00000010) == 0x00000010);
- }
- /**
- * optional bytes identityKey = 4;
- */
- public com.google.protobuf.ByteString getIdentityKey() {
- return identityKey_;
- }
- /**
- * optional bytes identityKey = 4;
- */
- public Builder setIdentityKey(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000010;
- identityKey_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes identityKey = 4;
- */
- public Builder clearIdentityKey() {
- bitField0_ = (bitField0_ & ~0x00000010);
- identityKey_ = getDefaultInstance().getIdentityKey();
- onChanged();
- return this;
- }
-
- // optional .textsecure.ServerCertificate signer = 5;
- private org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate signer_ = org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.getDefaultInstance();
- private com.google.protobuf.SingleFieldBuilder<
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate, org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Builder, org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificateOrBuilder> signerBuilder_;
- /**
- * optional .textsecure.ServerCertificate signer = 5;
- */
- public boolean hasSigner() {
- return ((bitField0_ & 0x00000020) == 0x00000020);
- }
- /**
- * optional .textsecure.ServerCertificate signer = 5;
- */
- public org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate getSigner() {
- if (signerBuilder_ == null) {
- return signer_;
- } else {
- return signerBuilder_.getMessage();
- }
- }
- /**
- * optional .textsecure.ServerCertificate signer = 5;
- */
- public Builder setSigner(org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate value) {
- if (signerBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- signer_ = value;
- onChanged();
- } else {
- signerBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000020;
- return this;
- }
- /**
- * optional .textsecure.ServerCertificate signer = 5;
- */
- public Builder setSigner(
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Builder builderForValue) {
- if (signerBuilder_ == null) {
- signer_ = builderForValue.build();
- onChanged();
- } else {
- signerBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000020;
- return this;
- }
- /**
- * optional .textsecure.ServerCertificate signer = 5;
- */
- public Builder mergeSigner(org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate value) {
- if (signerBuilder_ == null) {
- if (((bitField0_ & 0x00000020) == 0x00000020) &&
- signer_ != org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.getDefaultInstance()) {
- signer_ =
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.newBuilder(signer_).mergeFrom(value).buildPartial();
- } else {
- signer_ = value;
- }
- onChanged();
- } else {
- signerBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000020;
- return this;
- }
- /**
- * optional .textsecure.ServerCertificate signer = 5;
- */
- public Builder clearSigner() {
- if (signerBuilder_ == null) {
- signer_ = org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.getDefaultInstance();
- onChanged();
- } else {
- signerBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000020);
- return this;
- }
- /**
- * optional .textsecure.ServerCertificate signer = 5;
- */
- public org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Builder getSignerBuilder() {
- bitField0_ |= 0x00000020;
- onChanged();
- return getSignerFieldBuilder().getBuilder();
- }
- /**
- * optional .textsecure.ServerCertificate signer = 5;
- */
- public org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificateOrBuilder getSignerOrBuilder() {
- if (signerBuilder_ != null) {
- return signerBuilder_.getMessageOrBuilder();
- } else {
- return signer_;
- }
- }
- /**
- * optional .textsecure.ServerCertificate signer = 5;
- */
- private com.google.protobuf.SingleFieldBuilder<
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate, org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Builder, org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificateOrBuilder>
- getSignerFieldBuilder() {
- if (signerBuilder_ == null) {
- signerBuilder_ = new com.google.protobuf.SingleFieldBuilder<
- org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate, org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate.Builder, org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificateOrBuilder>(
- signer_,
- getParentForChildren(),
- isClean());
- signer_ = null;
- }
- return signerBuilder_;
- }
-
- // @@protoc_insertion_point(builder_scope:textsecure.SenderCertificate.Certificate)
- }
-
- static {
- defaultInstance = new Certificate(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:textsecure.SenderCertificate.Certificate)
- }
-
- private int bitField0_;
- // optional bytes certificate = 1;
- public static final int CERTIFICATE_FIELD_NUMBER = 1;
- private com.google.protobuf.ByteString certificate_;
- /**
- * optional bytes certificate = 1;
- */
- public boolean hasCertificate() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional bytes certificate = 1;
- */
- public com.google.protobuf.ByteString getCertificate() {
- return certificate_;
- }
-
- // optional bytes signature = 2;
- public static final int SIGNATURE_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString signature_;
- /**
- * optional bytes signature = 2;
- */
- public boolean hasSignature() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional bytes signature = 2;
- */
- public com.google.protobuf.ByteString getSignature() {
- return signature_;
- }
-
- private void initFields() {
- certificate_ = com.google.protobuf.ByteString.EMPTY;
- signature_ = com.google.protobuf.ByteString.EMPTY;
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeBytes(1, certificate_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(2, signature_);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, certificate_);
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, signature_);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate 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.textsecuregcm.entities.MessageProtos.SenderCertificate parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate 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.textsecuregcm.entities.MessageProtos.SenderCertificate 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.SenderCertificate}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder
- implements org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificateOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_SenderCertificate_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_SenderCertificate_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.class, org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.Builder.class);
- }
-
- // Construct using org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.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();
- certificate_ = com.google.protobuf.ByteString.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000001);
- signature_ = com.google.protobuf.ByteString.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000002);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.internal_static_textsecure_SenderCertificate_descriptor;
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate getDefaultInstanceForType() {
- return org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.getDefaultInstance();
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate build() {
- org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate buildPartial() {
- org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate result = new org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.certificate_ = certificate_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
- result.signature_ = signature_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate) {
- return mergeFrom((org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate other) {
- if (other == org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate.getDefaultInstance()) return this;
- if (other.hasCertificate()) {
- setCertificate(other.getCertificate());
- }
- if (other.hasSignature()) {
- setSignature(other.getSignature());
- }
- 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.textsecuregcm.entities.MessageProtos.SenderCertificate parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate) e.getUnfinishedMessage();
- throw e;
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- // optional bytes certificate = 1;
- private com.google.protobuf.ByteString certificate_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes certificate = 1;
- */
- public boolean hasCertificate() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional bytes certificate = 1;
- */
- public com.google.protobuf.ByteString getCertificate() {
- return certificate_;
- }
- /**
- * optional bytes certificate = 1;
- */
- public Builder setCertificate(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- certificate_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes certificate = 1;
- */
- public Builder clearCertificate() {
- bitField0_ = (bitField0_ & ~0x00000001);
- certificate_ = getDefaultInstance().getCertificate();
- onChanged();
- return this;
- }
-
- // optional bytes signature = 2;
- private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes signature = 2;
- */
- public boolean hasSignature() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional bytes signature = 2;
- */
- public com.google.protobuf.ByteString getSignature() {
- return signature_;
- }
- /**
- * optional bytes signature = 2;
- */
- public Builder setSignature(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- signature_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes signature = 2;
- */
- public Builder clearSignature() {
- bitField0_ = (bitField0_ & ~0x00000002);
- signature_ = getDefaultInstance().getSignature();
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:textsecure.SenderCertificate)
- }
-
- static {
- defaultInstance = new SenderCertificate(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:textsecure.SenderCertificate)
- }
-
- 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_ProvisioningUuid_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_textsecure_ProvisioningUuid_fieldAccessorTable;
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_textsecure_ServerCertificate_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_textsecure_ServerCertificate_fieldAccessorTable;
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_textsecure_ServerCertificate_Certificate_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_textsecure_ServerCertificate_Certificate_fieldAccessorTable;
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_textsecure_SenderCertificate_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_textsecure_SenderCertificate_fieldAccessorTable;
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_textsecure_SenderCertificate_Certificate_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_textsecure_SenderCertificate_Certificate_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\"\325\002\n\010Envel" +
- "ope\022\'\n\004type\030\001 \001(\0162\031.textsecure.Envelope." +
- "Type\022\016\n\006source\030\002 \001(\t\022\022\n\nsourceUuid\030\013 \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\rlegacyMessage\030\006 \001(\014\022" +
- "\017\n\007content\030\010 \001(\014\022\022\n\nserverGuid\030\t \001(\t\022\030\n\020" +
- "server_timestamp\030\n \001(\004\"n\n\004Type\022\013\n\007UNKNOW" +
- "N\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\007RECEIPT\020\005\022\027\n\023UNIDENT" +
- "IFIED_SENDER\020\006\" \n\020ProvisioningUuid\022\014\n\004uu",
- "id\030\001 \001(\t\"c\n\021ServerCertificate\022\023\n\013certifi" +
- "cate\030\001 \001(\014\022\021\n\tsignature\030\002 \001(\014\032&\n\013Certifi" +
- "cate\022\n\n\002id\030\001 \001(\r\022\013\n\003key\030\002 \001(\014\"\332\001\n\021Sender" +
- "Certificate\022\023\n\013certificate\030\001 \001(\014\022\021\n\tsign" +
- "ature\030\002 \001(\014\032\234\001\n\013Certificate\022\016\n\006sender\030\001 " +
- "\001(\t\022\022\n\nsenderUuid\030\006 \001(\t\022\024\n\014senderDevice\030" +
- "\002 \001(\r\022\017\n\007expires\030\003 \001(\006\022\023\n\013identityKey\030\004 " +
- "\001(\014\022-\n\006signer\030\005 \001(\0132\035.textsecure.ServerC" +
- "ertificateB:\n)org.whispersystems.textsec" +
- "uregcm.entitiesB\rMessageProtos"
- };
- 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", "SourceUuid", "SourceDevice", "Relay", "Timestamp", "LegacyMessage", "Content", "ServerGuid", "ServerTimestamp", });
- internal_static_textsecure_ProvisioningUuid_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_textsecure_ProvisioningUuid_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_textsecure_ProvisioningUuid_descriptor,
- new java.lang.String[] { "Uuid", });
- internal_static_textsecure_ServerCertificate_descriptor =
- getDescriptor().getMessageTypes().get(2);
- internal_static_textsecure_ServerCertificate_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_textsecure_ServerCertificate_descriptor,
- new java.lang.String[] { "Certificate", "Signature", });
- internal_static_textsecure_ServerCertificate_Certificate_descriptor =
- internal_static_textsecure_ServerCertificate_descriptor.getNestedTypes().get(0);
- internal_static_textsecure_ServerCertificate_Certificate_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_textsecure_ServerCertificate_Certificate_descriptor,
- new java.lang.String[] { "Id", "Key", });
- internal_static_textsecure_SenderCertificate_descriptor =
- getDescriptor().getMessageTypes().get(3);
- internal_static_textsecure_SenderCertificate_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_textsecure_SenderCertificate_descriptor,
- new java.lang.String[] { "Certificate", "Signature", });
- internal_static_textsecure_SenderCertificate_Certificate_descriptor =
- internal_static_textsecure_SenderCertificate_descriptor.getNestedTypes().get(0);
- internal_static_textsecure_SenderCertificate_Certificate_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_textsecure_SenderCertificate_Certificate_descriptor,
- new java.lang.String[] { "Sender", "SenderUuid", "SenderDevice", "Expires", "IdentityKey", "Signer", });
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- }, assigner);
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/storage/PubSubProtos.java b/service/src/main/java/org/whispersystems/textsecuregcm/storage/PubSubProtos.java
deleted file mode 100644
index 9910b47bb..000000000
--- a/service/src/main/java/org/whispersystems/textsecuregcm/storage/PubSubProtos.java
+++ /dev/null
@@ -1,666 +0,0 @@
-/*
- * Copyright 2013-2020 Signal Messenger, LLC
- * SPDX-License-Identifier: AGPL-3.0-only
- */
-
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: PubSubMessage.proto
-
-package org.whispersystems.textsecuregcm.storage;
-
-public final class PubSubProtos {
- private PubSubProtos() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- }
- public interface PubSubMessageOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // optional .textsecure.PubSubMessage.Type type = 1;
- /**
- * optional .textsecure.PubSubMessage.Type type = 1;
- */
- boolean hasType();
- /**
- * optional .textsecure.PubSubMessage.Type type = 1;
- */
- org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.Type getType();
-
- // optional bytes content = 2;
- /**
- * optional bytes content = 2;
- */
- boolean hasContent();
- /**
- * optional bytes content = 2;
- */
- com.google.protobuf.ByteString getContent();
- }
- /**
- * Protobuf type {@code textsecure.PubSubMessage}
- */
- public static final class PubSubMessage extends
- com.google.protobuf.GeneratedMessage
- implements PubSubMessageOrBuilder {
- // Use PubSubMessage.newBuilder() to construct.
- private PubSubMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private PubSubMessage(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
- private static final PubSubMessage defaultInstance;
- public static PubSubMessage getDefaultInstance() {
- return defaultInstance;
- }
-
- public PubSubMessage getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private PubSubMessage(
- 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.textsecuregcm.storage.PubSubProtos.PubSubMessage.Type value = org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.Type.valueOf(rawValue);
- if (value == null) {
- unknownFields.mergeVarintField(1, rawValue);
- } else {
- bitField0_ |= 0x00000001;
- type_ = value;
- }
- break;
- }
- case 18: {
- bitField0_ |= 0x00000002;
- 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.textsecuregcm.storage.PubSubProtos.internal_static_textsecure_PubSubMessage_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.whispersystems.textsecuregcm.storage.PubSubProtos.internal_static_textsecure_PubSubMessage_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.class, org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.Builder.class);
- }
-
- public static com.google.protobuf.Parser PARSER =
- new com.google.protobuf.AbstractParser() {
- public PubSubMessage parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new PubSubMessage(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- /**
- * Protobuf enum {@code textsecure.PubSubMessage.Type}
- */
- public enum Type
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- * UNKNOWN = 0;
- */
- UNKNOWN(0, 0),
- /**
- * QUERY_DB = 1;
- */
- QUERY_DB(1, 1),
- /**
- * DELIVER = 2;
- */
- DELIVER(2, 2),
- /**
- * KEEPALIVE = 3;
- */
- KEEPALIVE(3, 3),
- /**
- * CLOSE = 4;
- */
- CLOSE(4, 4),
- /**
- * CONNECTED = 5;
- */
- CONNECTED(5, 5),
- ;
-
- /**
- * UNKNOWN = 0;
- */
- public static final int UNKNOWN_VALUE = 0;
- /**
- * QUERY_DB = 1;
- */
- public static final int QUERY_DB_VALUE = 1;
- /**
- * DELIVER = 2;
- */
- public static final int DELIVER_VALUE = 2;
- /**
- * KEEPALIVE = 3;
- */
- public static final int KEEPALIVE_VALUE = 3;
- /**
- * CLOSE = 4;
- */
- public static final int CLOSE_VALUE = 4;
- /**
- * CONNECTED = 5;
- */
- public static final int CONNECTED_VALUE = 5;
-
-
- public final int getNumber() { return value; }
-
- public static Type valueOf(int value) {
- switch (value) {
- case 0: return UNKNOWN;
- case 1: return QUERY_DB;
- case 2: return DELIVER;
- case 3: return KEEPALIVE;
- case 4: return CLOSE;
- case 5: return CONNECTED;
- 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.textsecuregcm.storage.PubSubProtos.PubSubMessage.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.PubSubMessage.Type)
- }
-
- private int bitField0_;
- // optional .textsecure.PubSubMessage.Type type = 1;
- public static final int TYPE_FIELD_NUMBER = 1;
- private org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.Type type_;
- /**
- * optional .textsecure.PubSubMessage.Type type = 1;
- */
- public boolean hasType() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional .textsecure.PubSubMessage.Type type = 1;
- */
- public org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.Type getType() {
- return type_;
- }
-
- // optional bytes content = 2;
- public static final int CONTENT_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString content_;
- /**
- * optional bytes content = 2;
- */
- public boolean hasContent() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional bytes content = 2;
- */
- public com.google.protobuf.ByteString getContent() {
- return content_;
- }
-
- private void initFields() {
- type_ = org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.Type.UNKNOWN;
- 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, 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, 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.textsecuregcm.storage.PubSubProtos.PubSubMessage parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage 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.textsecuregcm.storage.PubSubProtos.PubSubMessage parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage 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.textsecuregcm.storage.PubSubProtos.PubSubMessage 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.PubSubMessage}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder
- implements org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessageOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.whispersystems.textsecuregcm.storage.PubSubProtos.internal_static_textsecure_PubSubMessage_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.whispersystems.textsecuregcm.storage.PubSubProtos.internal_static_textsecure_PubSubMessage_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.class, org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.Builder.class);
- }
-
- // Construct using org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.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.textsecuregcm.storage.PubSubProtos.PubSubMessage.Type.UNKNOWN;
- bitField0_ = (bitField0_ & ~0x00000001);
- content_ = com.google.protobuf.ByteString.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000002);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.whispersystems.textsecuregcm.storage.PubSubProtos.internal_static_textsecure_PubSubMessage_descriptor;
- }
-
- public org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage getDefaultInstanceForType() {
- return org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.getDefaultInstance();
- }
-
- public org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage build() {
- org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage buildPartial() {
- org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage result = new org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage(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.content_ = content_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage) {
- return mergeFrom((org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage other) {
- if (other == org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.getDefaultInstance()) return this;
- if (other.hasType()) {
- setType(other.getType());
- }
- 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.textsecuregcm.storage.PubSubProtos.PubSubMessage parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage) e.getUnfinishedMessage();
- throw e;
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- // optional .textsecure.PubSubMessage.Type type = 1;
- private org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.Type type_ = org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.Type.UNKNOWN;
- /**
- * optional .textsecure.PubSubMessage.Type type = 1;
- */
- public boolean hasType() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * optional .textsecure.PubSubMessage.Type type = 1;
- */
- public org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.Type getType() {
- return type_;
- }
- /**
- * optional .textsecure.PubSubMessage.Type type = 1;
- */
- public Builder setType(org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.Type value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- type_ = value;
- onChanged();
- return this;
- }
- /**
- * optional .textsecure.PubSubMessage.Type type = 1;
- */
- public Builder clearType() {
- bitField0_ = (bitField0_ & ~0x00000001);
- type_ = org.whispersystems.textsecuregcm.storage.PubSubProtos.PubSubMessage.Type.UNKNOWN;
- onChanged();
- return this;
- }
-
- // optional bytes content = 2;
- private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * optional bytes content = 2;
- */
- public boolean hasContent() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * optional bytes content = 2;
- */
- public com.google.protobuf.ByteString getContent() {
- return content_;
- }
- /**
- * optional bytes content = 2;
- */
- public Builder setContent(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- content_ = value;
- onChanged();
- return this;
- }
- /**
- * optional bytes content = 2;
- */
- public Builder clearContent() {
- bitField0_ = (bitField0_ & ~0x00000002);
- content_ = getDefaultInstance().getContent();
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:textsecure.PubSubMessage)
- }
-
- static {
- defaultInstance = new PubSubMessage(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:textsecure.PubSubMessage)
- }
-
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_textsecure_PubSubMessage_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_textsecure_PubSubMessage_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\023PubSubMessage.proto\022\ntextsecure\"\247\001\n\rPu" +
- "bSubMessage\022,\n\004type\030\001 \001(\0162\036.textsecure.P" +
- "ubSubMessage.Type\022\017\n\007content\030\002 \001(\014\"W\n\004Ty" +
- "pe\022\013\n\007UNKNOWN\020\000\022\014\n\010QUERY_DB\020\001\022\013\n\007DELIVER" +
- "\020\002\022\r\n\tKEEPALIVE\020\003\022\t\n\005CLOSE\020\004\022\r\n\tCONNECTE" +
- "D\020\005B8\n(org.whispersystems.textsecuregcm." +
- "storageB\014PubSubProtos"
- };
- 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_PubSubMessage_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_textsecure_PubSubMessage_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_textsecure_PubSubMessage_descriptor,
- new java.lang.String[] { "Type", "Content", });
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- }, assigner);
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/service/protobuf/PubSubMessage.proto b/service/src/main/proto/PubSubMessage.proto
similarity index 100%
rename from service/protobuf/PubSubMessage.proto
rename to service/src/main/proto/PubSubMessage.proto
diff --git a/service/protobuf/TextSecure.proto b/service/src/main/proto/TextSecure.proto
similarity index 100%
rename from service/protobuf/TextSecure.proto
rename to service/src/main/proto/TextSecure.proto