PageRenderTime 60ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/NotifierLib/src/org/damazio/notifier/protocol/Common.java

https://code.google.com/p/android-notifier/
Java | 1242 lines | 1081 code | 122 blank | 39 comment | 154 complexity | 753a4432cbaa409d4ca196c54981fdd4 MD5 | raw file
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: common.proto
  3. package org.damazio.notifier.protocol;
  4. public final class Common {
  5. private Common() {}
  6. public static void registerAllExtensions(
  7. com.google.protobuf.ExtensionRegistryLite registry) {
  8. }
  9. public interface EventOrBuilder
  10. extends com.google.protobuf.MessageLiteOrBuilder {
  11. // optional int64 source_device_id = 1;
  12. boolean hasSourceDeviceId();
  13. long getSourceDeviceId();
  14. // repeated int64 target_device_id = 2;
  15. java.util.List<java.lang.Long> getTargetDeviceIdList();
  16. int getTargetDeviceIdCount();
  17. long getTargetDeviceId(int index);
  18. // required int64 timestamp = 3;
  19. boolean hasTimestamp();
  20. long getTimestamp();
  21. // required .org.damazio.notifier.protocol.Event.Type type = 4;
  22. boolean hasType();
  23. org.damazio.notifier.protocol.Common.Event.Type getType();
  24. // optional bytes payload = 5;
  25. boolean hasPayload();
  26. com.google.protobuf.ByteString getPayload();
  27. }
  28. public static final class Event extends
  29. com.google.protobuf.GeneratedMessageLite
  30. implements EventOrBuilder {
  31. // Use Event.newBuilder() to construct.
  32. private Event(Builder builder) {
  33. super(builder);
  34. }
  35. private Event(boolean noInit) {}
  36. private static final Event defaultInstance;
  37. public static Event getDefaultInstance() {
  38. return defaultInstance;
  39. }
  40. public Event getDefaultInstanceForType() {
  41. return defaultInstance;
  42. }
  43. public enum Type
  44. implements com.google.protobuf.Internal.EnumLite {
  45. NOTIFICATION_RING(0, 1),
  46. NOTIFICATION_MISSED_CALL(1, 2),
  47. NOTIFICATION_VOICEMAIL(2, 3),
  48. NOTIFICATION_SMS(3, 4),
  49. NOTIFICATION_MMS(4, 5),
  50. NOTIFICATION_BATTERY(5, 6),
  51. NOTIFICATION_THIRD_PARTY(6, 7),
  52. NOTIFICATION_MASK(7, 15),
  53. COMMAND_CALL(8, 16),
  54. COMMAND_HANGUP(9, 17),
  55. COMMAND_SMS(10, 18),
  56. COMMAND_THIRD_PARTY(11, 19),
  57. COMMAND_MASK(12, 240),
  58. ;
  59. public static final int NOTIFICATION_RING_VALUE = 1;
  60. public static final int NOTIFICATION_MISSED_CALL_VALUE = 2;
  61. public static final int NOTIFICATION_VOICEMAIL_VALUE = 3;
  62. public static final int NOTIFICATION_SMS_VALUE = 4;
  63. public static final int NOTIFICATION_MMS_VALUE = 5;
  64. public static final int NOTIFICATION_BATTERY_VALUE = 6;
  65. public static final int NOTIFICATION_THIRD_PARTY_VALUE = 7;
  66. public static final int NOTIFICATION_MASK_VALUE = 15;
  67. public static final int COMMAND_CALL_VALUE = 16;
  68. public static final int COMMAND_HANGUP_VALUE = 17;
  69. public static final int COMMAND_SMS_VALUE = 18;
  70. public static final int COMMAND_THIRD_PARTY_VALUE = 19;
  71. public static final int COMMAND_MASK_VALUE = 240;
  72. public final int getNumber() { return value; }
  73. public static Type valueOf(int value) {
  74. switch (value) {
  75. case 1: return NOTIFICATION_RING;
  76. case 2: return NOTIFICATION_MISSED_CALL;
  77. case 3: return NOTIFICATION_VOICEMAIL;
  78. case 4: return NOTIFICATION_SMS;
  79. case 5: return NOTIFICATION_MMS;
  80. case 6: return NOTIFICATION_BATTERY;
  81. case 7: return NOTIFICATION_THIRD_PARTY;
  82. case 15: return NOTIFICATION_MASK;
  83. case 16: return COMMAND_CALL;
  84. case 17: return COMMAND_HANGUP;
  85. case 18: return COMMAND_SMS;
  86. case 19: return COMMAND_THIRD_PARTY;
  87. case 240: return COMMAND_MASK;
  88. default: return null;
  89. }
  90. }
  91. public static com.google.protobuf.Internal.EnumLiteMap<Type>
  92. internalGetValueMap() {
  93. return internalValueMap;
  94. }
  95. private static com.google.protobuf.Internal.EnumLiteMap<Type>
  96. internalValueMap =
  97. new com.google.protobuf.Internal.EnumLiteMap<Type>() {
  98. public Type findValueByNumber(int number) {
  99. return Type.valueOf(number);
  100. }
  101. };
  102. private final int value;
  103. private Type(int index, int value) {
  104. this.value = value;
  105. }
  106. // @@protoc_insertion_point(enum_scope:org.damazio.notifier.protocol.Event.Type)
  107. }
  108. private int bitField0_;
  109. // optional int64 source_device_id = 1;
  110. public static final int SOURCE_DEVICE_ID_FIELD_NUMBER = 1;
  111. private long sourceDeviceId_;
  112. public boolean hasSourceDeviceId() {
  113. return ((bitField0_ & 0x00000001) == 0x00000001);
  114. }
  115. public long getSourceDeviceId() {
  116. return sourceDeviceId_;
  117. }
  118. // repeated int64 target_device_id = 2;
  119. public static final int TARGET_DEVICE_ID_FIELD_NUMBER = 2;
  120. private java.util.List<java.lang.Long> targetDeviceId_;
  121. public java.util.List<java.lang.Long>
  122. getTargetDeviceIdList() {
  123. return targetDeviceId_;
  124. }
  125. public int getTargetDeviceIdCount() {
  126. return targetDeviceId_.size();
  127. }
  128. public long getTargetDeviceId(int index) {
  129. return targetDeviceId_.get(index);
  130. }
  131. // required int64 timestamp = 3;
  132. public static final int TIMESTAMP_FIELD_NUMBER = 3;
  133. private long timestamp_;
  134. public boolean hasTimestamp() {
  135. return ((bitField0_ & 0x00000002) == 0x00000002);
  136. }
  137. public long getTimestamp() {
  138. return timestamp_;
  139. }
  140. // required .org.damazio.notifier.protocol.Event.Type type = 4;
  141. public static final int TYPE_FIELD_NUMBER = 4;
  142. private org.damazio.notifier.protocol.Common.Event.Type type_;
  143. public boolean hasType() {
  144. return ((bitField0_ & 0x00000004) == 0x00000004);
  145. }
  146. public org.damazio.notifier.protocol.Common.Event.Type getType() {
  147. return type_;
  148. }
  149. // optional bytes payload = 5;
  150. public static final int PAYLOAD_FIELD_NUMBER = 5;
  151. private com.google.protobuf.ByteString payload_;
  152. public boolean hasPayload() {
  153. return ((bitField0_ & 0x00000008) == 0x00000008);
  154. }
  155. public com.google.protobuf.ByteString getPayload() {
  156. return payload_;
  157. }
  158. private void initFields() {
  159. sourceDeviceId_ = 0L;
  160. targetDeviceId_ = java.util.Collections.emptyList();;
  161. timestamp_ = 0L;
  162. type_ = org.damazio.notifier.protocol.Common.Event.Type.NOTIFICATION_RING;
  163. payload_ = com.google.protobuf.ByteString.EMPTY;
  164. }
  165. private byte memoizedIsInitialized = -1;
  166. public final boolean isInitialized() {
  167. byte isInitialized = memoizedIsInitialized;
  168. if (isInitialized != -1) return isInitialized == 1;
  169. if (!hasTimestamp()) {
  170. memoizedIsInitialized = 0;
  171. return false;
  172. }
  173. if (!hasType()) {
  174. memoizedIsInitialized = 0;
  175. return false;
  176. }
  177. memoizedIsInitialized = 1;
  178. return true;
  179. }
  180. public void writeTo(com.google.protobuf.CodedOutputStream output)
  181. throws java.io.IOException {
  182. getSerializedSize();
  183. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  184. output.writeInt64(1, sourceDeviceId_);
  185. }
  186. for (int i = 0; i < targetDeviceId_.size(); i++) {
  187. output.writeInt64(2, targetDeviceId_.get(i));
  188. }
  189. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  190. output.writeInt64(3, timestamp_);
  191. }
  192. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  193. output.writeEnum(4, type_.getNumber());
  194. }
  195. if (((bitField0_ & 0x00000008) == 0x00000008)) {
  196. output.writeBytes(5, payload_);
  197. }
  198. }
  199. private int memoizedSerializedSize = -1;
  200. public int getSerializedSize() {
  201. int size = memoizedSerializedSize;
  202. if (size != -1) return size;
  203. size = 0;
  204. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  205. size += com.google.protobuf.CodedOutputStream
  206. .computeInt64Size(1, sourceDeviceId_);
  207. }
  208. {
  209. int dataSize = 0;
  210. for (int i = 0; i < targetDeviceId_.size(); i++) {
  211. dataSize += com.google.protobuf.CodedOutputStream
  212. .computeInt64SizeNoTag(targetDeviceId_.get(i));
  213. }
  214. size += dataSize;
  215. size += 1 * getTargetDeviceIdList().size();
  216. }
  217. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  218. size += com.google.protobuf.CodedOutputStream
  219. .computeInt64Size(3, timestamp_);
  220. }
  221. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  222. size += com.google.protobuf.CodedOutputStream
  223. .computeEnumSize(4, type_.getNumber());
  224. }
  225. if (((bitField0_ & 0x00000008) == 0x00000008)) {
  226. size += com.google.protobuf.CodedOutputStream
  227. .computeBytesSize(5, payload_);
  228. }
  229. memoizedSerializedSize = size;
  230. return size;
  231. }
  232. @java.lang.Override
  233. protected Object writeReplace() throws java.io.ObjectStreamException {
  234. return super.writeReplace();
  235. }
  236. public static org.damazio.notifier.protocol.Common.Event parseFrom(
  237. com.google.protobuf.ByteString data)
  238. throws com.google.protobuf.InvalidProtocolBufferException {
  239. return newBuilder().mergeFrom(data).buildParsed();
  240. }
  241. public static org.damazio.notifier.protocol.Common.Event parseFrom(
  242. com.google.protobuf.ByteString data,
  243. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  244. throws com.google.protobuf.InvalidProtocolBufferException {
  245. return newBuilder().mergeFrom(data, extensionRegistry)
  246. .buildParsed();
  247. }
  248. public static org.damazio.notifier.protocol.Common.Event parseFrom(byte[] data)
  249. throws com.google.protobuf.InvalidProtocolBufferException {
  250. return newBuilder().mergeFrom(data).buildParsed();
  251. }
  252. public static org.damazio.notifier.protocol.Common.Event parseFrom(
  253. byte[] data,
  254. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  255. throws com.google.protobuf.InvalidProtocolBufferException {
  256. return newBuilder().mergeFrom(data, extensionRegistry)
  257. .buildParsed();
  258. }
  259. public static org.damazio.notifier.protocol.Common.Event parseFrom(java.io.InputStream input)
  260. throws java.io.IOException {
  261. return newBuilder().mergeFrom(input).buildParsed();
  262. }
  263. public static org.damazio.notifier.protocol.Common.Event parseFrom(
  264. java.io.InputStream input,
  265. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  266. throws java.io.IOException {
  267. return newBuilder().mergeFrom(input, extensionRegistry)
  268. .buildParsed();
  269. }
  270. public static org.damazio.notifier.protocol.Common.Event parseDelimitedFrom(java.io.InputStream input)
  271. throws java.io.IOException {
  272. Builder builder = newBuilder();
  273. if (builder.mergeDelimitedFrom(input)) {
  274. return builder.buildParsed();
  275. } else {
  276. return null;
  277. }
  278. }
  279. public static org.damazio.notifier.protocol.Common.Event parseDelimitedFrom(
  280. java.io.InputStream input,
  281. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  282. throws java.io.IOException {
  283. Builder builder = newBuilder();
  284. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  285. return builder.buildParsed();
  286. } else {
  287. return null;
  288. }
  289. }
  290. public static org.damazio.notifier.protocol.Common.Event parseFrom(
  291. com.google.protobuf.CodedInputStream input)
  292. throws java.io.IOException {
  293. return newBuilder().mergeFrom(input).buildParsed();
  294. }
  295. public static org.damazio.notifier.protocol.Common.Event parseFrom(
  296. com.google.protobuf.CodedInputStream input,
  297. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  298. throws java.io.IOException {
  299. return newBuilder().mergeFrom(input, extensionRegistry)
  300. .buildParsed();
  301. }
  302. public static Builder newBuilder() { return Builder.create(); }
  303. public Builder newBuilderForType() { return newBuilder(); }
  304. public static Builder newBuilder(org.damazio.notifier.protocol.Common.Event prototype) {
  305. return newBuilder().mergeFrom(prototype);
  306. }
  307. public Builder toBuilder() { return newBuilder(this); }
  308. public static final class Builder extends
  309. com.google.protobuf.GeneratedMessageLite.Builder<
  310. org.damazio.notifier.protocol.Common.Event, Builder>
  311. implements org.damazio.notifier.protocol.Common.EventOrBuilder {
  312. // Construct using org.damazio.notifier.protocol.Common.Event.newBuilder()
  313. private Builder() {
  314. maybeForceBuilderInitialization();
  315. }
  316. private void maybeForceBuilderInitialization() {
  317. }
  318. private static Builder create() {
  319. return new Builder();
  320. }
  321. public Builder clear() {
  322. super.clear();
  323. sourceDeviceId_ = 0L;
  324. bitField0_ = (bitField0_ & ~0x00000001);
  325. targetDeviceId_ = java.util.Collections.emptyList();;
  326. bitField0_ = (bitField0_ & ~0x00000002);
  327. timestamp_ = 0L;
  328. bitField0_ = (bitField0_ & ~0x00000004);
  329. type_ = org.damazio.notifier.protocol.Common.Event.Type.NOTIFICATION_RING;
  330. bitField0_ = (bitField0_ & ~0x00000008);
  331. payload_ = com.google.protobuf.ByteString.EMPTY;
  332. bitField0_ = (bitField0_ & ~0x00000010);
  333. return this;
  334. }
  335. public Builder clone() {
  336. return create().mergeFrom(buildPartial());
  337. }
  338. public org.damazio.notifier.protocol.Common.Event getDefaultInstanceForType() {
  339. return org.damazio.notifier.protocol.Common.Event.getDefaultInstance();
  340. }
  341. public org.damazio.notifier.protocol.Common.Event build() {
  342. org.damazio.notifier.protocol.Common.Event result = buildPartial();
  343. if (!result.isInitialized()) {
  344. throw newUninitializedMessageException(result);
  345. }
  346. return result;
  347. }
  348. private org.damazio.notifier.protocol.Common.Event buildParsed()
  349. throws com.google.protobuf.InvalidProtocolBufferException {
  350. org.damazio.notifier.protocol.Common.Event result = buildPartial();
  351. if (!result.isInitialized()) {
  352. throw newUninitializedMessageException(
  353. result).asInvalidProtocolBufferException();
  354. }
  355. return result;
  356. }
  357. public org.damazio.notifier.protocol.Common.Event buildPartial() {
  358. org.damazio.notifier.protocol.Common.Event result = new org.damazio.notifier.protocol.Common.Event(this);
  359. int from_bitField0_ = bitField0_;
  360. int to_bitField0_ = 0;
  361. if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
  362. to_bitField0_ |= 0x00000001;
  363. }
  364. result.sourceDeviceId_ = sourceDeviceId_;
  365. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  366. targetDeviceId_ = java.util.Collections.unmodifiableList(targetDeviceId_);
  367. bitField0_ = (bitField0_ & ~0x00000002);
  368. }
  369. result.targetDeviceId_ = targetDeviceId_;
  370. if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
  371. to_bitField0_ |= 0x00000002;
  372. }
  373. result.timestamp_ = timestamp_;
  374. if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
  375. to_bitField0_ |= 0x00000004;
  376. }
  377. result.type_ = type_;
  378. if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
  379. to_bitField0_ |= 0x00000008;
  380. }
  381. result.payload_ = payload_;
  382. result.bitField0_ = to_bitField0_;
  383. return result;
  384. }
  385. public Builder mergeFrom(org.damazio.notifier.protocol.Common.Event other) {
  386. if (other == org.damazio.notifier.protocol.Common.Event.getDefaultInstance()) return this;
  387. if (other.hasSourceDeviceId()) {
  388. setSourceDeviceId(other.getSourceDeviceId());
  389. }
  390. if (!other.targetDeviceId_.isEmpty()) {
  391. if (targetDeviceId_.isEmpty()) {
  392. targetDeviceId_ = other.targetDeviceId_;
  393. bitField0_ = (bitField0_ & ~0x00000002);
  394. } else {
  395. ensureTargetDeviceIdIsMutable();
  396. targetDeviceId_.addAll(other.targetDeviceId_);
  397. }
  398. }
  399. if (other.hasTimestamp()) {
  400. setTimestamp(other.getTimestamp());
  401. }
  402. if (other.hasType()) {
  403. setType(other.getType());
  404. }
  405. if (other.hasPayload()) {
  406. setPayload(other.getPayload());
  407. }
  408. return this;
  409. }
  410. public final boolean isInitialized() {
  411. if (!hasTimestamp()) {
  412. return false;
  413. }
  414. if (!hasType()) {
  415. return false;
  416. }
  417. return true;
  418. }
  419. public Builder mergeFrom(
  420. com.google.protobuf.CodedInputStream input,
  421. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  422. throws java.io.IOException {
  423. while (true) {
  424. int tag = input.readTag();
  425. switch (tag) {
  426. case 0:
  427. return this;
  428. default: {
  429. if (!parseUnknownField(input, extensionRegistry, tag)) {
  430. return this;
  431. }
  432. break;
  433. }
  434. case 8: {
  435. bitField0_ |= 0x00000001;
  436. sourceDeviceId_ = input.readInt64();
  437. break;
  438. }
  439. case 16: {
  440. ensureTargetDeviceIdIsMutable();
  441. targetDeviceId_.add(input.readInt64());
  442. break;
  443. }
  444. case 18: {
  445. int length = input.readRawVarint32();
  446. int limit = input.pushLimit(length);
  447. while (input.getBytesUntilLimit() > 0) {
  448. addTargetDeviceId(input.readInt64());
  449. }
  450. input.popLimit(limit);
  451. break;
  452. }
  453. case 24: {
  454. bitField0_ |= 0x00000004;
  455. timestamp_ = input.readInt64();
  456. break;
  457. }
  458. case 32: {
  459. int rawValue = input.readEnum();
  460. org.damazio.notifier.protocol.Common.Event.Type value = org.damazio.notifier.protocol.Common.Event.Type.valueOf(rawValue);
  461. if (value != null) {
  462. bitField0_ |= 0x00000008;
  463. type_ = value;
  464. }
  465. break;
  466. }
  467. case 42: {
  468. bitField0_ |= 0x00000010;
  469. payload_ = input.readBytes();
  470. break;
  471. }
  472. }
  473. }
  474. }
  475. private int bitField0_;
  476. // optional int64 source_device_id = 1;
  477. private long sourceDeviceId_ ;
  478. public boolean hasSourceDeviceId() {
  479. return ((bitField0_ & 0x00000001) == 0x00000001);
  480. }
  481. public long getSourceDeviceId() {
  482. return sourceDeviceId_;
  483. }
  484. public Builder setSourceDeviceId(long value) {
  485. bitField0_ |= 0x00000001;
  486. sourceDeviceId_ = value;
  487. return this;
  488. }
  489. public Builder clearSourceDeviceId() {
  490. bitField0_ = (bitField0_ & ~0x00000001);
  491. sourceDeviceId_ = 0L;
  492. return this;
  493. }
  494. // repeated int64 target_device_id = 2;
  495. private java.util.List<java.lang.Long> targetDeviceId_ = java.util.Collections.emptyList();;
  496. private void ensureTargetDeviceIdIsMutable() {
  497. if (!((bitField0_ & 0x00000002) == 0x00000002)) {
  498. targetDeviceId_ = new java.util.ArrayList<java.lang.Long>(targetDeviceId_);
  499. bitField0_ |= 0x00000002;
  500. }
  501. }
  502. public java.util.List<java.lang.Long>
  503. getTargetDeviceIdList() {
  504. return java.util.Collections.unmodifiableList(targetDeviceId_);
  505. }
  506. public int getTargetDeviceIdCount() {
  507. return targetDeviceId_.size();
  508. }
  509. public long getTargetDeviceId(int index) {
  510. return targetDeviceId_.get(index);
  511. }
  512. public Builder setTargetDeviceId(
  513. int index, long value) {
  514. ensureTargetDeviceIdIsMutable();
  515. targetDeviceId_.set(index, value);
  516. return this;
  517. }
  518. public Builder addTargetDeviceId(long value) {
  519. ensureTargetDeviceIdIsMutable();
  520. targetDeviceId_.add(value);
  521. return this;
  522. }
  523. public Builder addAllTargetDeviceId(
  524. java.lang.Iterable<? extends java.lang.Long> values) {
  525. ensureTargetDeviceIdIsMutable();
  526. super.addAll(values, targetDeviceId_);
  527. return this;
  528. }
  529. public Builder clearTargetDeviceId() {
  530. targetDeviceId_ = java.util.Collections.emptyList();;
  531. bitField0_ = (bitField0_ & ~0x00000002);
  532. return this;
  533. }
  534. // required int64 timestamp = 3;
  535. private long timestamp_ ;
  536. public boolean hasTimestamp() {
  537. return ((bitField0_ & 0x00000004) == 0x00000004);
  538. }
  539. public long getTimestamp() {
  540. return timestamp_;
  541. }
  542. public Builder setTimestamp(long value) {
  543. bitField0_ |= 0x00000004;
  544. timestamp_ = value;
  545. return this;
  546. }
  547. public Builder clearTimestamp() {
  548. bitField0_ = (bitField0_ & ~0x00000004);
  549. timestamp_ = 0L;
  550. return this;
  551. }
  552. // required .org.damazio.notifier.protocol.Event.Type type = 4;
  553. private org.damazio.notifier.protocol.Common.Event.Type type_ = org.damazio.notifier.protocol.Common.Event.Type.NOTIFICATION_RING;
  554. public boolean hasType() {
  555. return ((bitField0_ & 0x00000008) == 0x00000008);
  556. }
  557. public org.damazio.notifier.protocol.Common.Event.Type getType() {
  558. return type_;
  559. }
  560. public Builder setType(org.damazio.notifier.protocol.Common.Event.Type value) {
  561. if (value == null) {
  562. throw new NullPointerException();
  563. }
  564. bitField0_ |= 0x00000008;
  565. type_ = value;
  566. return this;
  567. }
  568. public Builder clearType() {
  569. bitField0_ = (bitField0_ & ~0x00000008);
  570. type_ = org.damazio.notifier.protocol.Common.Event.Type.NOTIFICATION_RING;
  571. return this;
  572. }
  573. // optional bytes payload = 5;
  574. private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY;
  575. public boolean hasPayload() {
  576. return ((bitField0_ & 0x00000010) == 0x00000010);
  577. }
  578. public com.google.protobuf.ByteString getPayload() {
  579. return payload_;
  580. }
  581. public Builder setPayload(com.google.protobuf.ByteString value) {
  582. if (value == null) {
  583. throw new NullPointerException();
  584. }
  585. bitField0_ |= 0x00000010;
  586. payload_ = value;
  587. return this;
  588. }
  589. public Builder clearPayload() {
  590. bitField0_ = (bitField0_ & ~0x00000010);
  591. payload_ = getDefaultInstance().getPayload();
  592. return this;
  593. }
  594. // @@protoc_insertion_point(builder_scope:org.damazio.notifier.protocol.Event)
  595. }
  596. static {
  597. defaultInstance = new Event(true);
  598. defaultInstance.initFields();
  599. }
  600. // @@protoc_insertion_point(class_scope:org.damazio.notifier.protocol.Event)
  601. }
  602. public interface PhoneNumberOrBuilder
  603. extends com.google.protobuf.MessageLiteOrBuilder {
  604. // optional string number = 1;
  605. boolean hasNumber();
  606. String getNumber();
  607. // optional string number_type = 2;
  608. boolean hasNumberType();
  609. String getNumberType();
  610. // optional string name = 3;
  611. boolean hasName();
  612. String getName();
  613. // optional bytes picture = 4;
  614. boolean hasPicture();
  615. com.google.protobuf.ByteString getPicture();
  616. }
  617. public static final class PhoneNumber extends
  618. com.google.protobuf.GeneratedMessageLite
  619. implements PhoneNumberOrBuilder {
  620. // Use PhoneNumber.newBuilder() to construct.
  621. private PhoneNumber(Builder builder) {
  622. super(builder);
  623. }
  624. private PhoneNumber(boolean noInit) {}
  625. private static final PhoneNumber defaultInstance;
  626. public static PhoneNumber getDefaultInstance() {
  627. return defaultInstance;
  628. }
  629. public PhoneNumber getDefaultInstanceForType() {
  630. return defaultInstance;
  631. }
  632. private int bitField0_;
  633. // optional string number = 1;
  634. public static final int NUMBER_FIELD_NUMBER = 1;
  635. private Object number_;
  636. public boolean hasNumber() {
  637. return ((bitField0_ & 0x00000001) == 0x00000001);
  638. }
  639. public String getNumber() {
  640. Object ref = number_;
  641. if (ref instanceof String) {
  642. return (String) ref;
  643. } else {
  644. com.google.protobuf.ByteString bs =
  645. (com.google.protobuf.ByteString) ref;
  646. String s = bs.toStringUtf8();
  647. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  648. number_ = s;
  649. }
  650. return s;
  651. }
  652. }
  653. private com.google.protobuf.ByteString getNumberBytes() {
  654. Object ref = number_;
  655. if (ref instanceof String) {
  656. com.google.protobuf.ByteString b =
  657. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  658. number_ = b;
  659. return b;
  660. } else {
  661. return (com.google.protobuf.ByteString) ref;
  662. }
  663. }
  664. // optional string number_type = 2;
  665. public static final int NUMBER_TYPE_FIELD_NUMBER = 2;
  666. private Object numberType_;
  667. public boolean hasNumberType() {
  668. return ((bitField0_ & 0x00000002) == 0x00000002);
  669. }
  670. public String getNumberType() {
  671. Object ref = numberType_;
  672. if (ref instanceof String) {
  673. return (String) ref;
  674. } else {
  675. com.google.protobuf.ByteString bs =
  676. (com.google.protobuf.ByteString) ref;
  677. String s = bs.toStringUtf8();
  678. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  679. numberType_ = s;
  680. }
  681. return s;
  682. }
  683. }
  684. private com.google.protobuf.ByteString getNumberTypeBytes() {
  685. Object ref = numberType_;
  686. if (ref instanceof String) {
  687. com.google.protobuf.ByteString b =
  688. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  689. numberType_ = b;
  690. return b;
  691. } else {
  692. return (com.google.protobuf.ByteString) ref;
  693. }
  694. }
  695. // optional string name = 3;
  696. public static final int NAME_FIELD_NUMBER = 3;
  697. private Object name_;
  698. public boolean hasName() {
  699. return ((bitField0_ & 0x00000004) == 0x00000004);
  700. }
  701. public String getName() {
  702. Object ref = name_;
  703. if (ref instanceof String) {
  704. return (String) ref;
  705. } else {
  706. com.google.protobuf.ByteString bs =
  707. (com.google.protobuf.ByteString) ref;
  708. String s = bs.toStringUtf8();
  709. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  710. name_ = s;
  711. }
  712. return s;
  713. }
  714. }
  715. private com.google.protobuf.ByteString getNameBytes() {
  716. Object ref = name_;
  717. if (ref instanceof String) {
  718. com.google.protobuf.ByteString b =
  719. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  720. name_ = b;
  721. return b;
  722. } else {
  723. return (com.google.protobuf.ByteString) ref;
  724. }
  725. }
  726. // optional bytes picture = 4;
  727. public static final int PICTURE_FIELD_NUMBER = 4;
  728. private com.google.protobuf.ByteString picture_;
  729. public boolean hasPicture() {
  730. return ((bitField0_ & 0x00000008) == 0x00000008);
  731. }
  732. public com.google.protobuf.ByteString getPicture() {
  733. return picture_;
  734. }
  735. private void initFields() {
  736. number_ = "";
  737. numberType_ = "";
  738. name_ = "";
  739. picture_ = com.google.protobuf.ByteString.EMPTY;
  740. }
  741. private byte memoizedIsInitialized = -1;
  742. public final boolean isInitialized() {
  743. byte isInitialized = memoizedIsInitialized;
  744. if (isInitialized != -1) return isInitialized == 1;
  745. memoizedIsInitialized = 1;
  746. return true;
  747. }
  748. public void writeTo(com.google.protobuf.CodedOutputStream output)
  749. throws java.io.IOException {
  750. getSerializedSize();
  751. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  752. output.writeBytes(1, getNumberBytes());
  753. }
  754. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  755. output.writeBytes(2, getNumberTypeBytes());
  756. }
  757. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  758. output.writeBytes(3, getNameBytes());
  759. }
  760. if (((bitField0_ & 0x00000008) == 0x00000008)) {
  761. output.writeBytes(4, picture_);
  762. }
  763. }
  764. private int memoizedSerializedSize = -1;
  765. public int getSerializedSize() {
  766. int size = memoizedSerializedSize;
  767. if (size != -1) return size;
  768. size = 0;
  769. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  770. size += com.google.protobuf.CodedOutputStream
  771. .computeBytesSize(1, getNumberBytes());
  772. }
  773. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  774. size += com.google.protobuf.CodedOutputStream
  775. .computeBytesSize(2, getNumberTypeBytes());
  776. }
  777. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  778. size += com.google.protobuf.CodedOutputStream
  779. .computeBytesSize(3, getNameBytes());
  780. }
  781. if (((bitField0_ & 0x00000008) == 0x00000008)) {
  782. size += com.google.protobuf.CodedOutputStream
  783. .computeBytesSize(4, picture_);
  784. }
  785. memoizedSerializedSize = size;
  786. return size;
  787. }
  788. @java.lang.Override
  789. protected Object writeReplace() throws java.io.ObjectStreamException {
  790. return super.writeReplace();
  791. }
  792. public static org.damazio.notifier.protocol.Common.PhoneNumber parseFrom(
  793. com.google.protobuf.ByteString data)
  794. throws com.google.protobuf.InvalidProtocolBufferException {
  795. return newBuilder().mergeFrom(data).buildParsed();
  796. }
  797. public static org.damazio.notifier.protocol.Common.PhoneNumber parseFrom(
  798. com.google.protobuf.ByteString data,
  799. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  800. throws com.google.protobuf.InvalidProtocolBufferException {
  801. return newBuilder().mergeFrom(data, extensionRegistry)
  802. .buildParsed();
  803. }
  804. public static org.damazio.notifier.protocol.Common.PhoneNumber parseFrom(byte[] data)
  805. throws com.google.protobuf.InvalidProtocolBufferException {
  806. return newBuilder().mergeFrom(data).buildParsed();
  807. }
  808. public static org.damazio.notifier.protocol.Common.PhoneNumber parseFrom(
  809. byte[] data,
  810. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  811. throws com.google.protobuf.InvalidProtocolBufferException {
  812. return newBuilder().mergeFrom(data, extensionRegistry)
  813. .buildParsed();
  814. }
  815. public static org.damazio.notifier.protocol.Common.PhoneNumber parseFrom(java.io.InputStream input)
  816. throws java.io.IOException {
  817. return newBuilder().mergeFrom(input).buildParsed();
  818. }
  819. public static org.damazio.notifier.protocol.Common.PhoneNumber parseFrom(
  820. java.io.InputStream input,
  821. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  822. throws java.io.IOException {
  823. return newBuilder().mergeFrom(input, extensionRegistry)
  824. .buildParsed();
  825. }
  826. public static org.damazio.notifier.protocol.Common.PhoneNumber parseDelimitedFrom(java.io.InputStream input)
  827. throws java.io.IOException {
  828. Builder builder = newBuilder();
  829. if (builder.mergeDelimitedFrom(input)) {
  830. return builder.buildParsed();
  831. } else {
  832. return null;
  833. }
  834. }
  835. public static org.damazio.notifier.protocol.Common.PhoneNumber parseDelimitedFrom(
  836. java.io.InputStream input,
  837. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  838. throws java.io.IOException {
  839. Builder builder = newBuilder();
  840. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  841. return builder.buildParsed();
  842. } else {
  843. return null;
  844. }
  845. }
  846. public static org.damazio.notifier.protocol.Common.PhoneNumber parseFrom(
  847. com.google.protobuf.CodedInputStream input)
  848. throws java.io.IOException {
  849. return newBuilder().mergeFrom(input).buildParsed();
  850. }
  851. public static org.damazio.notifier.protocol.Common.PhoneNumber parseFrom(
  852. com.google.protobuf.CodedInputStream input,
  853. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  854. throws java.io.IOException {
  855. return newBuilder().mergeFrom(input, extensionRegistry)
  856. .buildParsed();
  857. }
  858. public static Builder newBuilder() { return Builder.create(); }
  859. public Builder newBuilderForType() { return newBuilder(); }
  860. public static Builder newBuilder(org.damazio.notifier.protocol.Common.PhoneNumber prototype) {
  861. return newBuilder().mergeFrom(prototype);
  862. }
  863. public Builder toBuilder() { return newBuilder(this); }
  864. public static final class Builder extends
  865. com.google.protobuf.GeneratedMessageLite.Builder<
  866. org.damazio.notifier.protocol.Common.PhoneNumber, Builder>
  867. implements org.damazio.notifier.protocol.Common.PhoneNumberOrBuilder {
  868. // Construct using org.damazio.notifier.protocol.Common.PhoneNumber.newBuilder()
  869. private Builder() {
  870. maybeForceBuilderInitialization();
  871. }
  872. private void maybeForceBuilderInitialization() {
  873. }
  874. private static Builder create() {
  875. return new Builder();
  876. }
  877. public Builder clear() {
  878. super.clear();
  879. number_ = "";
  880. bitField0_ = (bitField0_ & ~0x00000001);
  881. numberType_ = "";
  882. bitField0_ = (bitField0_ & ~0x00000002);
  883. name_ = "";
  884. bitField0_ = (bitField0_ & ~0x00000004);
  885. picture_ = com.google.protobuf.ByteString.EMPTY;
  886. bitField0_ = (bitField0_ & ~0x00000008);
  887. return this;
  888. }
  889. public Builder clone() {
  890. return create().mergeFrom(buildPartial());
  891. }
  892. public org.damazio.notifier.protocol.Common.PhoneNumber getDefaultInstanceForType() {
  893. return org.damazio.notifier.protocol.Common.PhoneNumber.getDefaultInstance();
  894. }
  895. public org.damazio.notifier.protocol.Common.PhoneNumber build() {
  896. org.damazio.notifier.protocol.Common.PhoneNumber result = buildPartial();
  897. if (!result.isInitialized()) {
  898. throw newUninitializedMessageException(result);
  899. }
  900. return result;
  901. }
  902. private org.damazio.notifier.protocol.Common.PhoneNumber buildParsed()
  903. throws com.google.protobuf.InvalidProtocolBufferException {
  904. org.damazio.notifier.protocol.Common.PhoneNumber result = buildPartial();
  905. if (!result.isInitialized()) {
  906. throw newUninitializedMessageException(
  907. result).asInvalidProtocolBufferException();
  908. }
  909. return result;
  910. }
  911. public org.damazio.notifier.protocol.Common.PhoneNumber buildPartial() {
  912. org.damazio.notifier.protocol.Common.PhoneNumber result = new org.damazio.notifier.protocol.Common.PhoneNumber(this);
  913. int from_bitField0_ = bitField0_;
  914. int to_bitField0_ = 0;
  915. if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
  916. to_bitField0_ |= 0x00000001;
  917. }
  918. result.number_ = number_;
  919. if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
  920. to_bitField0_ |= 0x00000002;
  921. }
  922. result.numberType_ = numberType_;
  923. if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
  924. to_bitField0_ |= 0x00000004;
  925. }
  926. result.name_ = name_;
  927. if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
  928. to_bitField0_ |= 0x00000008;
  929. }
  930. result.picture_ = picture_;
  931. result.bitField0_ = to_bitField0_;
  932. return result;
  933. }
  934. public Builder mergeFrom(org.damazio.notifier.protocol.Common.PhoneNumber other) {
  935. if (other == org.damazio.notifier.protocol.Common.PhoneNumber.getDefaultInstance()) return this;
  936. if (other.hasNumber()) {
  937. setNumber(other.getNumber());
  938. }
  939. if (other.hasNumberType()) {
  940. setNumberType(other.getNumberType());
  941. }
  942. if (other.hasName()) {
  943. setName(other.getName());
  944. }
  945. if (other.hasPicture()) {
  946. setPicture(other.getPicture());
  947. }
  948. return this;
  949. }
  950. public final boolean isInitialized() {
  951. return true;
  952. }
  953. public Builder mergeFrom(
  954. com.google.protobuf.CodedInputStream input,
  955. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  956. throws java.io.IOException {
  957. while (true) {
  958. int tag = input.readTag();
  959. switch (tag) {
  960. case 0:
  961. return this;
  962. default: {
  963. if (!parseUnknownField(input, extensionRegistry, tag)) {
  964. return this;
  965. }
  966. break;
  967. }
  968. case 10: {
  969. bitField0_ |= 0x00000001;
  970. number_ = input.readBytes();
  971. break;
  972. }
  973. case 18: {
  974. bitField0_ |= 0x00000002;
  975. numberType_ = input.readBytes();
  976. break;
  977. }
  978. case 26: {
  979. bitField0_ |= 0x00000004;
  980. name_ = input.readBytes();
  981. break;
  982. }
  983. case 34: {
  984. bitField0_ |= 0x00000008;
  985. picture_ = input.readBytes();
  986. break;
  987. }
  988. }
  989. }
  990. }
  991. private int bitField0_;
  992. // optional string number = 1;
  993. private Object number_ = "";
  994. public boolean hasNumber() {
  995. return ((bitField0_ & 0x00000001) == 0x00000001);
  996. }
  997. public String getNumber() {
  998. Object ref = number_;
  999. if (!(ref instanceof String)) {
  1000. String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
  1001. number_ = s;
  1002. return s;
  1003. } else {
  1004. return (String) ref;
  1005. }
  1006. }
  1007. public Builder setNumber(String value) {
  1008. if (value == null) {
  1009. throw new NullPointerException();
  1010. }
  1011. bitField0_ |= 0x00000001;
  1012. number_ = value;
  1013. return this;
  1014. }
  1015. public Builder clearNumber() {
  1016. bitField0_ = (bitField0_ & ~0x00000001);
  1017. number_ = getDefaultInstance().getNumber();
  1018. return this;
  1019. }
  1020. void setNumber(com.google.protobuf.ByteString value) {
  1021. bitField0_ |= 0x00000001;
  1022. number_ = value;
  1023. }
  1024. // optional string number_type = 2;
  1025. private Object numberType_ = "";
  1026. public boolean hasNumberType() {
  1027. return ((bitField0_ & 0x00000002) == 0x00000002);
  1028. }
  1029. public String getNumberType() {
  1030. Object ref = numberType_;
  1031. if (!(ref instanceof String)) {
  1032. String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
  1033. numberType_ = s;
  1034. return s;
  1035. } else {
  1036. return (String) ref;
  1037. }
  1038. }
  1039. public Builder setNumberType(String value) {
  1040. if (value == null) {
  1041. throw new NullPointerException();
  1042. }
  1043. bitField0_ |= 0x00000002;
  1044. numberType_ = value;
  1045. return this;
  1046. }
  1047. public Builder clearNumberType() {
  1048. bitField0_ = (bitField0_ & ~0x00000002);
  1049. numberType_ = getDefaultInstance().getNumberType();
  1050. return this;
  1051. }
  1052. void setNumberType(com.google.protobuf.ByteString value) {
  1053. bitField0_ |= 0x00000002;
  1054. numberType_ = value;
  1055. }
  1056. // optional string name = 3;
  1057. private Object name_ = "";
  1058. public boolean hasName() {
  1059. return ((bitField0_ & 0x00000004) == 0x00000004);
  1060. }
  1061. public String getName() {
  1062. Object ref = name_;
  1063. if (!(ref instanceof String)) {
  1064. String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
  1065. name_ = s;
  1066. return s;
  1067. } else {
  1068. return (String) ref;
  1069. }
  1070. }
  1071. public Builder setName(String value) {
  1072. if (value == null) {
  1073. throw new NullPointerException();
  1074. }
  1075. bitField0_ |= 0x00000004;
  1076. name_ = value;
  1077. return this;
  1078. }
  1079. public Builder clearName() {
  1080. bitField0_ = (bitField0_ & ~0x00000004);
  1081. name_ = getDefaultInstance().getName();
  1082. return this;
  1083. }
  1084. void setName(com.google.protobuf.ByteString value) {
  1085. bitField0_ |= 0x00000004;
  1086. name_ = value;
  1087. }
  1088. // optional bytes picture = 4;
  1089. private com.google.protobuf.ByteString picture_ = com.google.protobuf.ByteString.EMPTY;
  1090. public boolean hasPicture() {
  1091. return ((bitField0_ & 0x00000008) == 0x00000008);
  1092. }
  1093. public com.google.protobuf.ByteString getPicture() {
  1094. return picture_;
  1095. }
  1096. public Builder setPicture(com.google.protobuf.ByteString value) {
  1097. if (value == null) {
  1098. throw new NullPointerException();
  1099. }
  1100. bitField0_ |= 0x00000008;
  1101. picture_ = value;
  1102. return this;
  1103. }
  1104. public Builder clearPicture() {
  1105. bitField0_ = (bitField0_ & ~0x00000008);
  1106. picture_ = getDefaultInstance().getPicture();
  1107. return this;
  1108. }
  1109. // @@protoc_insertion_point(builder_scope:org.damazio.notifier.protocol.PhoneNumber)
  1110. }
  1111. static {
  1112. defaultInstance = new PhoneNumber(true);
  1113. defaultInstance.initFields();
  1114. }
  1115. // @@protoc_insertion_point(class_scope:org.damazio.notifier.protocol.PhoneNumber)
  1116. }
  1117. static {
  1118. }
  1119. // @@protoc_insertion_point(outer_class_scope)
  1120. }