/NotifierLib/src/org/damazio/notifier/protocol/Common.java
Java | 1242 lines | 1081 code | 122 blank | 39 comment | 154 complexity | 753a4432cbaa409d4ca196c54981fdd4 MD5 | raw file
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: common.proto
- package org.damazio.notifier.protocol;
- public final class Common {
- private Common() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
- public interface EventOrBuilder
- extends com.google.protobuf.MessageLiteOrBuilder {
-
- // optional int64 source_device_id = 1;
- boolean hasSourceDeviceId();
- long getSourceDeviceId();
-
- // repeated int64 target_device_id = 2;
- java.util.List<java.lang.Long> getTargetDeviceIdList();
- int getTargetDeviceIdCount();
- long getTargetDeviceId(int index);
-
- // required int64 timestamp = 3;
- boolean hasTimestamp();
- long getTimestamp();
-
- // required .org.damazio.notifier.protocol.Event.Type type = 4;
- boolean hasType();
- org.damazio.notifier.protocol.Common.Event.Type getType();
-
- // optional bytes payload = 5;
- boolean hasPayload();
- com.google.protobuf.ByteString getPayload();
- }
- public static final class Event extends
- com.google.protobuf.GeneratedMessageLite
- implements EventOrBuilder {
- // Use Event.newBuilder() to construct.
- private Event(Builder builder) {
- super(builder);
- }
- private Event(boolean noInit) {}
-
- private static final Event defaultInstance;
- public static Event getDefaultInstance() {
- return defaultInstance;
- }
-
- public Event getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public enum Type
- implements com.google.protobuf.Internal.EnumLite {
- NOTIFICATION_RING(0, 1),
- NOTIFICATION_MISSED_CALL(1, 2),
- NOTIFICATION_VOICEMAIL(2, 3),
- NOTIFICATION_SMS(3, 4),
- NOTIFICATION_MMS(4, 5),
- NOTIFICATION_BATTERY(5, 6),
- NOTIFICATION_THIRD_PARTY(6, 7),
- NOTIFICATION_MASK(7, 15),
- COMMAND_CALL(8, 16),
- COMMAND_HANGUP(9, 17),
- COMMAND_SMS(10, 18),
- COMMAND_THIRD_PARTY(11, 19),
- COMMAND_MASK(12, 240),
- ;
-
- public static final int NOTIFICATION_RING_VALUE = 1;
- public static final int NOTIFICATION_MISSED_CALL_VALUE = 2;
- public static final int NOTIFICATION_VOICEMAIL_VALUE = 3;
- public static final int NOTIFICATION_SMS_VALUE = 4;
- public static final int NOTIFICATION_MMS_VALUE = 5;
- public static final int NOTIFICATION_BATTERY_VALUE = 6;
- public static final int NOTIFICATION_THIRD_PARTY_VALUE = 7;
- public static final int NOTIFICATION_MASK_VALUE = 15;
- public static final int COMMAND_CALL_VALUE = 16;
- public static final int COMMAND_HANGUP_VALUE = 17;
- public static final int COMMAND_SMS_VALUE = 18;
- public static final int COMMAND_THIRD_PARTY_VALUE = 19;
- public static final int COMMAND_MASK_VALUE = 240;
-
-
- public final int getNumber() { return value; }
-
- public static Type valueOf(int value) {
- switch (value) {
- case 1: return NOTIFICATION_RING;
- case 2: return NOTIFICATION_MISSED_CALL;
- case 3: return NOTIFICATION_VOICEMAIL;
- case 4: return NOTIFICATION_SMS;
- case 5: return NOTIFICATION_MMS;
- case 6: return NOTIFICATION_BATTERY;
- case 7: return NOTIFICATION_THIRD_PARTY;
- case 15: return NOTIFICATION_MASK;
- case 16: return COMMAND_CALL;
- case 17: return COMMAND_HANGUP;
- case 18: return COMMAND_SMS;
- case 19: return COMMAND_THIRD_PARTY;
- case 240: return COMMAND_MASK;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap<Type>
- internalGetValueMap() {
- return internalValueMap;
- }
- private static com.google.protobuf.Internal.EnumLiteMap<Type>
- internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap<Type>() {
- public Type findValueByNumber(int number) {
- return Type.valueOf(number);
- }
- };
-
- private final int value;
-
- private Type(int index, int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:org.damazio.notifier.protocol.Event.Type)
- }
-
- private int bitField0_;
- // optional int64 source_device_id = 1;
- public static final int SOURCE_DEVICE_ID_FIELD_NUMBER = 1;
- private long sourceDeviceId_;
- public boolean hasSourceDeviceId() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public long getSourceDeviceId() {
- return sourceDeviceId_;
- }
-
- // repeated int64 target_device_id = 2;
- public static final int TARGET_DEVICE_ID_FIELD_NUMBER = 2;
- private java.util.List<java.lang.Long> targetDeviceId_;
- public java.util.List<java.lang.Long>
- getTargetDeviceIdList() {
- return targetDeviceId_;
- }
- public int getTargetDeviceIdCount() {
- return targetDeviceId_.size();
- }
- public long getTargetDeviceId(int index) {
- return targetDeviceId_.get(index);
- }
-
- // required int64 timestamp = 3;
- public static final int TIMESTAMP_FIELD_NUMBER = 3;
- private long timestamp_;
- public boolean hasTimestamp() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public long getTimestamp() {
- return timestamp_;
- }
-
- // required .org.damazio.notifier.protocol.Event.Type type = 4;
- public static final int TYPE_FIELD_NUMBER = 4;
- private org.damazio.notifier.protocol.Common.Event.Type type_;
- public boolean hasType() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- public org.damazio.notifier.protocol.Common.Event.Type getType() {
- return type_;
- }
-
- // optional bytes payload = 5;
- public static final int PAYLOAD_FIELD_NUMBER = 5;
- private com.google.protobuf.ByteString payload_;
- public boolean hasPayload() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- public com.google.protobuf.ByteString getPayload() {
- return payload_;
- }
-
- private void initFields() {
- sourceDeviceId_ = 0L;
- targetDeviceId_ = java.util.Collections.emptyList();;
- timestamp_ = 0L;
- type_ = org.damazio.notifier.protocol.Common.Event.Type.NOTIFICATION_RING;
- payload_ = com.google.protobuf.ByteString.EMPTY;
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- if (!hasTimestamp()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!hasType()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeInt64(1, sourceDeviceId_);
- }
- for (int i = 0; i < targetDeviceId_.size(); i++) {
- output.writeInt64(2, targetDeviceId_.get(i));
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeInt64(3, timestamp_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeEnum(4, type_.getNumber());
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- output.writeBytes(5, payload_);
- }
- }
-
- 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
- .computeInt64Size(1, sourceDeviceId_);
- }
- {
- int dataSize = 0;
- for (int i = 0; i < targetDeviceId_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeInt64SizeNoTag(targetDeviceId_.get(i));
- }
- size += dataSize;
- size += 1 * getTargetDeviceIdList().size();
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(3, timestamp_);
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(4, type_.getNumber());
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(5, payload_);
- }
- memoizedSerializedSize = size;
- return size;
- }
-
- @java.lang.Override
- protected Object writeReplace() throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static org.damazio.notifier.protocol.Common.Event parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.damazio.notifier.protocol.Common.Event parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.damazio.notifier.protocol.Common.Event parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.damazio.notifier.protocol.Common.Event parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.damazio.notifier.protocol.Common.Event parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.damazio.notifier.protocol.Common.Event parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static org.damazio.notifier.protocol.Common.Event parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static org.damazio.notifier.protocol.Common.Event parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static org.damazio.notifier.protocol.Common.Event parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.damazio.notifier.protocol.Common.Event parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(org.damazio.notifier.protocol.Common.Event prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageLite.Builder<
- org.damazio.notifier.protocol.Common.Event, Builder>
- implements org.damazio.notifier.protocol.Common.EventOrBuilder {
- // Construct using org.damazio.notifier.protocol.Common.Event.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- }
- private static Builder create() {
- return new Builder();
- }
-
- public Builder clear() {
- super.clear();
- sourceDeviceId_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000001);
- targetDeviceId_ = java.util.Collections.emptyList();;
- bitField0_ = (bitField0_ & ~0x00000002);
- timestamp_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000004);
- type_ = org.damazio.notifier.protocol.Common.Event.Type.NOTIFICATION_RING;
- bitField0_ = (bitField0_ & ~0x00000008);
- payload_ = com.google.protobuf.ByteString.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000010);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public org.damazio.notifier.protocol.Common.Event getDefaultInstanceForType() {
- return org.damazio.notifier.protocol.Common.Event.getDefaultInstance();
- }
-
- public org.damazio.notifier.protocol.Common.Event build() {
- org.damazio.notifier.protocol.Common.Event result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- private org.damazio.notifier.protocol.Common.Event buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- org.damazio.notifier.protocol.Common.Event result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return result;
- }
-
- public org.damazio.notifier.protocol.Common.Event buildPartial() {
- org.damazio.notifier.protocol.Common.Event result = new org.damazio.notifier.protocol.Common.Event(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.sourceDeviceId_ = sourceDeviceId_;
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- targetDeviceId_ = java.util.Collections.unmodifiableList(targetDeviceId_);
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.targetDeviceId_ = targetDeviceId_;
- if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
- to_bitField0_ |= 0x00000002;
- }
- result.timestamp_ = timestamp_;
- if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
- to_bitField0_ |= 0x00000004;
- }
- result.type_ = type_;
- if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
- to_bitField0_ |= 0x00000008;
- }
- result.payload_ = payload_;
- result.bitField0_ = to_bitField0_;
- return result;
- }
-
- public Builder mergeFrom(org.damazio.notifier.protocol.Common.Event other) {
- if (other == org.damazio.notifier.protocol.Common.Event.getDefaultInstance()) return this;
- if (other.hasSourceDeviceId()) {
- setSourceDeviceId(other.getSourceDeviceId());
- }
- if (!other.targetDeviceId_.isEmpty()) {
- if (targetDeviceId_.isEmpty()) {
- targetDeviceId_ = other.targetDeviceId_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensureTargetDeviceIdIsMutable();
- targetDeviceId_.addAll(other.targetDeviceId_);
- }
-
- }
- if (other.hasTimestamp()) {
- setTimestamp(other.getTimestamp());
- }
- if (other.hasType()) {
- setType(other.getType());
- }
- if (other.hasPayload()) {
- setPayload(other.getPayload());
- }
- return this;
- }
-
- public final boolean isInitialized() {
- if (!hasTimestamp()) {
-
- return false;
- }
- if (!hasType()) {
-
- return false;
- }
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
-
- return this;
- default: {
- if (!parseUnknownField(input, extensionRegistry, tag)) {
-
- return this;
- }
- break;
- }
- case 8: {
- bitField0_ |= 0x00000001;
- sourceDeviceId_ = input.readInt64();
- break;
- }
- case 16: {
- ensureTargetDeviceIdIsMutable();
- targetDeviceId_.add(input.readInt64());
- break;
- }
- case 18: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- while (input.getBytesUntilLimit() > 0) {
- addTargetDeviceId(input.readInt64());
- }
- input.popLimit(limit);
- break;
- }
- case 24: {
- bitField0_ |= 0x00000004;
- timestamp_ = input.readInt64();
- break;
- }
- case 32: {
- int rawValue = input.readEnum();
- org.damazio.notifier.protocol.Common.Event.Type value = org.damazio.notifier.protocol.Common.Event.Type.valueOf(rawValue);
- if (value != null) {
- bitField0_ |= 0x00000008;
- type_ = value;
- }
- break;
- }
- case 42: {
- bitField0_ |= 0x00000010;
- payload_ = input.readBytes();
- break;
- }
- }
- }
- }
-
- private int bitField0_;
-
- // optional int64 source_device_id = 1;
- private long sourceDeviceId_ ;
- public boolean hasSourceDeviceId() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public long getSourceDeviceId() {
- return sourceDeviceId_;
- }
- public Builder setSourceDeviceId(long value) {
- bitField0_ |= 0x00000001;
- sourceDeviceId_ = value;
-
- return this;
- }
- public Builder clearSourceDeviceId() {
- bitField0_ = (bitField0_ & ~0x00000001);
- sourceDeviceId_ = 0L;
-
- return this;
- }
-
- // repeated int64 target_device_id = 2;
- private java.util.List<java.lang.Long> targetDeviceId_ = java.util.Collections.emptyList();;
- private void ensureTargetDeviceIdIsMutable() {
- if (!((bitField0_ & 0x00000002) == 0x00000002)) {
- targetDeviceId_ = new java.util.ArrayList<java.lang.Long>(targetDeviceId_);
- bitField0_ |= 0x00000002;
- }
- }
- public java.util.List<java.lang.Long>
- getTargetDeviceIdList() {
- return java.util.Collections.unmodifiableList(targetDeviceId_);
- }
- public int getTargetDeviceIdCount() {
- return targetDeviceId_.size();
- }
- public long getTargetDeviceId(int index) {
- return targetDeviceId_.get(index);
- }
- public Builder setTargetDeviceId(
- int index, long value) {
- ensureTargetDeviceIdIsMutable();
- targetDeviceId_.set(index, value);
-
- return this;
- }
- public Builder addTargetDeviceId(long value) {
- ensureTargetDeviceIdIsMutable();
- targetDeviceId_.add(value);
-
- return this;
- }
- public Builder addAllTargetDeviceId(
- java.lang.Iterable<? extends java.lang.Long> values) {
- ensureTargetDeviceIdIsMutable();
- super.addAll(values, targetDeviceId_);
-
- return this;
- }
- public Builder clearTargetDeviceId() {
- targetDeviceId_ = java.util.Collections.emptyList();;
- bitField0_ = (bitField0_ & ~0x00000002);
-
- return this;
- }
-
- // required int64 timestamp = 3;
- private long timestamp_ ;
- public boolean hasTimestamp() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- public long getTimestamp() {
- return timestamp_;
- }
- public Builder setTimestamp(long value) {
- bitField0_ |= 0x00000004;
- timestamp_ = value;
-
- return this;
- }
- public Builder clearTimestamp() {
- bitField0_ = (bitField0_ & ~0x00000004);
- timestamp_ = 0L;
-
- return this;
- }
-
- // required .org.damazio.notifier.protocol.Event.Type type = 4;
- private org.damazio.notifier.protocol.Common.Event.Type type_ = org.damazio.notifier.protocol.Common.Event.Type.NOTIFICATION_RING;
- public boolean hasType() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- public org.damazio.notifier.protocol.Common.Event.Type getType() {
- return type_;
- }
- public Builder setType(org.damazio.notifier.protocol.Common.Event.Type value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000008;
- type_ = value;
-
- return this;
- }
- public Builder clearType() {
- bitField0_ = (bitField0_ & ~0x00000008);
- type_ = org.damazio.notifier.protocol.Common.Event.Type.NOTIFICATION_RING;
-
- return this;
- }
-
- // optional bytes payload = 5;
- private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
- public boolean hasPayload() {
- return ((bitField0_ & 0x00000010) == 0x00000010);
- }
- public com.google.protobuf.ByteString getPayload() {
- return payload_;
- }
- public Builder setPayload(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000010;
- payload_ = value;
-
- return this;
- }
- public Builder clearPayload() {
- bitField0_ = (bitField0_ & ~0x00000010);
- payload_ = getDefaultInstance().getPayload();
-
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:org.damazio.notifier.protocol.Event)
- }
-
- static {
- defaultInstance = new Event(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:org.damazio.notifier.protocol.Event)
- }
-
- public interface PhoneNumberOrBuilder
- extends com.google.protobuf.MessageLiteOrBuilder {
-
- // optional string number = 1;
- boolean hasNumber();
- String getNumber();
-
- // optional string number_type = 2;
- boolean hasNumberType();
- String getNumberType();
-
- // optional string name = 3;
- boolean hasName();
- String getName();
-
- // optional bytes picture = 4;
- boolean hasPicture();
- com.google.protobuf.ByteString getPicture();
- }
- public static final class PhoneNumber extends
- com.google.protobuf.GeneratedMessageLite
- implements PhoneNumberOrBuilder {
- // Use PhoneNumber.newBuilder() to construct.
- private PhoneNumber(Builder builder) {
- super(builder);
- }
- private PhoneNumber(boolean noInit) {}
-
- private static final PhoneNumber defaultInstance;
- public static PhoneNumber getDefaultInstance() {
- return defaultInstance;
- }
-
- public PhoneNumber getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private int bitField0_;
- // optional string number = 1;
- public static final int NUMBER_FIELD_NUMBER = 1;
- private Object number_;
- public boolean hasNumber() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public String getNumber() {
- Object ref = number_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- number_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getNumberBytes() {
- Object ref = number_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- number_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional string number_type = 2;
- public static final int NUMBER_TYPE_FIELD_NUMBER = 2;
- private Object numberType_;
- public boolean hasNumberType() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public String getNumberType() {
- Object ref = numberType_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- numberType_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getNumberTypeBytes() {
- Object ref = numberType_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- numberType_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional string name = 3;
- public static final int NAME_FIELD_NUMBER = 3;
- private Object name_;
- public boolean hasName() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- public String getName() {
- Object ref = name_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- name_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getNameBytes() {
- Object ref = name_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional bytes picture = 4;
- public static final int PICTURE_FIELD_NUMBER = 4;
- private com.google.protobuf.ByteString picture_;
- public boolean hasPicture() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- public com.google.protobuf.ByteString getPicture() {
- return picture_;
- }
-
- private void initFields() {
- number_ = "";
- numberType_ = "";
- name_ = "";
- picture_ = 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, getNumberBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(2, getNumberTypeBytes());
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeBytes(3, getNameBytes());
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- output.writeBytes(4, picture_);
- }
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, getNumberBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, getNumberTypeBytes());
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, getNameBytes());
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(4, picture_);
- }
- memoizedSerializedSize = size;
- return size;
- }
-
- @java.lang.Override
- protected Object writeReplace() throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static org.damazio.notifier.protocol.Common.PhoneNumber parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.damazio.notifier.protocol.Common.PhoneNumber parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.damazio.notifier.protocol.Common.PhoneNumber parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.damazio.notifier.protocol.Common.PhoneNumber parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.damazio.notifier.protocol.Common.PhoneNumber parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.damazio.notifier.protocol.Common.PhoneNumber parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static org.damazio.notifier.protocol.Common.PhoneNumber parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static org.damazio.notifier.protocol.Common.PhoneNumber parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static org.damazio.notifier.protocol.Common.PhoneNumber parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.damazio.notifier.protocol.Common.PhoneNumber parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(org.damazio.notifier.protocol.Common.PhoneNumber prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageLite.Builder<
- org.damazio.notifier.protocol.Common.PhoneNumber, Builder>
- implements org.damazio.notifier.protocol.Common.PhoneNumberOrBuilder {
- // Construct using org.damazio.notifier.protocol.Common.PhoneNumber.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- }
- private static Builder create() {
- return new Builder();
- }
-
- public Builder clear() {
- super.clear();
- number_ = "";
- bitField0_ = (bitField0_ & ~0x00000001);
- numberType_ = "";
- bitField0_ = (bitField0_ & ~0x00000002);
- name_ = "";
- bitField0_ = (bitField0_ & ~0x00000004);
- picture_ = com.google.protobuf.ByteString.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000008);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public org.damazio.notifier.protocol.Common.PhoneNumber getDefaultInstanceForType() {
- return org.damazio.notifier.protocol.Common.PhoneNumber.getDefaultInstance();
- }
-
- public org.damazio.notifier.protocol.Common.PhoneNumber build() {
- org.damazio.notifier.protocol.Common.PhoneNumber result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- private org.damazio.notifier.protocol.Common.PhoneNumber buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- org.damazio.notifier.protocol.Common.PhoneNumber result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return result;
- }
-
- public org.damazio.notifier.protocol.Common.PhoneNumber buildPartial() {
- org.damazio.notifier.protocol.Common.PhoneNumber result = new org.damazio.notifier.protocol.Common.PhoneNumber(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.number_ = number_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
- result.numberType_ = numberType_;
- if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
- to_bitField0_ |= 0x00000004;
- }
- result.name_ = name_;
- if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
- to_bitField0_ |= 0x00000008;
- }
- result.picture_ = picture_;
- result.bitField0_ = to_bitField0_;
- return result;
- }
-
- public Builder mergeFrom(org.damazio.notifier.protocol.Common.PhoneNumber other) {
- if (other == org.damazio.notifier.protocol.Common.PhoneNumber.getDefaultInstance()) return this;
- if (other.hasNumber()) {
- setNumber(other.getNumber());
- }
- if (other.hasNumberType()) {
- setNumberType(other.getNumberType());
- }
- if (other.hasName()) {
- setName(other.getName());
- }
- if (other.hasPicture()) {
- setPicture(other.getPicture());
- }
- 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 {
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
-
- return this;
- default: {
- if (!parseUnknownField(input, extensionRegistry, tag)) {
-
- return this;
- }
- break;
- }
- case 10: {
- bitField0_ |= 0x00000001;
- number_ = input.readBytes();
- break;
- }
- case 18: {
- bitField0_ |= 0x00000002;
- numberType_ = input.readBytes();
- break;
- }
- case 26: {
- bitField0_ |= 0x00000004;
- name_ = input.readBytes();
- break;
- }
- case 34: {
- bitField0_ |= 0x00000008;
- picture_ = input.readBytes();
- break;
- }
- }
- }
- }
-
- private int bitField0_;
-
- // optional string number = 1;
- private Object number_ = "";
- public boolean hasNumber() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public String getNumber() {
- Object ref = number_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- number_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setNumber(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- number_ = value;
-
- return this;
- }
- public Builder clearNumber() {
- bitField0_ = (bitField0_ & ~0x00000001);
- number_ = getDefaultInstance().getNumber();
-
- return this;
- }
- void setNumber(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000001;
- number_ = value;
-
- }
-
- // optional string number_type = 2;
- private Object numberType_ = "";
- public boolean hasNumberType() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public String getNumberType() {
- Object ref = numberType_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- numberType_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setNumberType(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- numberType_ = value;
-
- return this;
- }
- public Builder clearNumberType() {
- bitField0_ = (bitField0_ & ~0x00000002);
- numberType_ = getDefaultInstance().getNumberType();
-
- return this;
- }
- void setNumberType(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000002;
- numberType_ = value;
-
- }
-
- // optional string name = 3;
- private Object name_ = "";
- public boolean hasName() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- public String getName() {
- Object ref = name_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- name_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setName(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
- name_ = value;
-
- return this;
- }
- public Builder clearName() {
- bitField0_ = (bitField0_ & ~0x00000004);
- name_ = getDefaultInstance().getName();
-
- return this;
- }
- void setName(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000004;
- name_ = value;
-
- }
-
- // optional bytes picture = 4;
- private com.google.protobuf.ByteString picture_ = com.google.protobuf.ByteString.EMPTY;
- public boolean hasPicture() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- public com.google.protobuf.ByteString getPicture() {
- return picture_;
- }
- public Builder setPicture(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000008;
- picture_ = value;
-
- return this;
- }
- public Builder clearPicture() {
- bitField0_ = (bitField0_ & ~0x00000008);
- picture_ = getDefaultInstance().getPicture();
-
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:org.damazio.notifier.protocol.PhoneNumber)
- }
-
- static {
- defaultInstance = new PhoneNumber(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:org.damazio.notifier.protocol.PhoneNumber)
- }
-
-
- static {
- }
-
- // @@protoc_insertion_point(outer_class_scope)
- }