PageRenderTime 59ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 1ms

/java/src/com/google/publicalerts/cap/Alert.java

https://code.google.com/p/cap-library/
Java | 2059 lines | 1917 code | 106 blank | 36 comment | 415 complexity | 99457d21ce86c8d4f0c48fb8a56c9e1b MD5 | raw file
Possible License(s): Apache-2.0

Large files files are truncated, but you can click here to view the full file

  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. package com.google.publicalerts.cap;
  3. public final class Alert extends
  4. com.google.protobuf.GeneratedMessage
  5. implements AlertOrBuilder {
  6. // Use Alert.newBuilder() to construct.
  7. private Alert(Builder builder) {
  8. super(builder);
  9. }
  10. private Alert(boolean noInit) {}
  11. private static final Alert defaultInstance;
  12. public static Alert getDefaultInstance() {
  13. return defaultInstance;
  14. }
  15. public Alert getDefaultInstanceForType() {
  16. return defaultInstance;
  17. }
  18. public static final com.google.protobuf.Descriptors.Descriptor
  19. getDescriptor() {
  20. return com.google.publicalerts.cap.Cap.internal_static_publicalerts_cap_Alert_descriptor;
  21. }
  22. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  23. internalGetFieldAccessorTable() {
  24. return com.google.publicalerts.cap.Cap.internal_static_publicalerts_cap_Alert_fieldAccessorTable;
  25. }
  26. public enum Status
  27. implements com.google.protobuf.ProtocolMessageEnum {
  28. ACTUAL(0, 0),
  29. EXERCISE(1, 1),
  30. SYSTEM(2, 2),
  31. TEST(3, 3),
  32. DRAFT(4, 4),
  33. ;
  34. public static final int ACTUAL_VALUE = 0;
  35. public static final int EXERCISE_VALUE = 1;
  36. public static final int SYSTEM_VALUE = 2;
  37. public static final int TEST_VALUE = 3;
  38. public static final int DRAFT_VALUE = 4;
  39. public final int getNumber() { return value; }
  40. public static Status valueOf(int value) {
  41. switch (value) {
  42. case 0: return ACTUAL;
  43. case 1: return EXERCISE;
  44. case 2: return SYSTEM;
  45. case 3: return TEST;
  46. case 4: return DRAFT;
  47. default: return null;
  48. }
  49. }
  50. public static com.google.protobuf.Internal.EnumLiteMap<Status>
  51. internalGetValueMap() {
  52. return internalValueMap;
  53. }
  54. private static com.google.protobuf.Internal.EnumLiteMap<Status>
  55. internalValueMap =
  56. new com.google.protobuf.Internal.EnumLiteMap<Status>() {
  57. public Status findValueByNumber(int number) {
  58. return Status.valueOf(number);
  59. }
  60. };
  61. public final com.google.protobuf.Descriptors.EnumValueDescriptor
  62. getValueDescriptor() {
  63. return getDescriptor().getValues().get(index);
  64. }
  65. public final com.google.protobuf.Descriptors.EnumDescriptor
  66. getDescriptorForType() {
  67. return getDescriptor();
  68. }
  69. public static final com.google.protobuf.Descriptors.EnumDescriptor
  70. getDescriptor() {
  71. return com.google.publicalerts.cap.Alert.getDescriptor().getEnumTypes().get(0);
  72. }
  73. private static final Status[] VALUES = {
  74. ACTUAL, EXERCISE, SYSTEM, TEST, DRAFT,
  75. };
  76. public static Status valueOf(
  77. com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
  78. if (desc.getType() != getDescriptor()) {
  79. throw new java.lang.IllegalArgumentException(
  80. "EnumValueDescriptor is not for this type.");
  81. }
  82. return VALUES[desc.getIndex()];
  83. }
  84. private final int index;
  85. private final int value;
  86. private Status(int index, int value) {
  87. this.index = index;
  88. this.value = value;
  89. }
  90. // @@protoc_insertion_point(enum_scope:publicalerts.cap.Alert.Status)
  91. }
  92. public enum MsgType
  93. implements com.google.protobuf.ProtocolMessageEnum {
  94. ALERT(0, 0),
  95. UPDATE(1, 1),
  96. CANCEL(2, 2),
  97. ACK(3, 3),
  98. ERROR(4, 4),
  99. ;
  100. public static final int ALERT_VALUE = 0;
  101. public static final int UPDATE_VALUE = 1;
  102. public static final int CANCEL_VALUE = 2;
  103. public static final int ACK_VALUE = 3;
  104. public static final int ERROR_VALUE = 4;
  105. public final int getNumber() { return value; }
  106. public static MsgType valueOf(int value) {
  107. switch (value) {
  108. case 0: return ALERT;
  109. case 1: return UPDATE;
  110. case 2: return CANCEL;
  111. case 3: return ACK;
  112. case 4: return ERROR;
  113. default: return null;
  114. }
  115. }
  116. public static com.google.protobuf.Internal.EnumLiteMap<MsgType>
  117. internalGetValueMap() {
  118. return internalValueMap;
  119. }
  120. private static com.google.protobuf.Internal.EnumLiteMap<MsgType>
  121. internalValueMap =
  122. new com.google.protobuf.Internal.EnumLiteMap<MsgType>() {
  123. public MsgType findValueByNumber(int number) {
  124. return MsgType.valueOf(number);
  125. }
  126. };
  127. public final com.google.protobuf.Descriptors.EnumValueDescriptor
  128. getValueDescriptor() {
  129. return getDescriptor().getValues().get(index);
  130. }
  131. public final com.google.protobuf.Descriptors.EnumDescriptor
  132. getDescriptorForType() {
  133. return getDescriptor();
  134. }
  135. public static final com.google.protobuf.Descriptors.EnumDescriptor
  136. getDescriptor() {
  137. return com.google.publicalerts.cap.Alert.getDescriptor().getEnumTypes().get(1);
  138. }
  139. private static final MsgType[] VALUES = {
  140. ALERT, UPDATE, CANCEL, ACK, ERROR,
  141. };
  142. public static MsgType valueOf(
  143. com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
  144. if (desc.getType() != getDescriptor()) {
  145. throw new java.lang.IllegalArgumentException(
  146. "EnumValueDescriptor is not for this type.");
  147. }
  148. return VALUES[desc.getIndex()];
  149. }
  150. private final int index;
  151. private final int value;
  152. private MsgType(int index, int value) {
  153. this.index = index;
  154. this.value = value;
  155. }
  156. // @@protoc_insertion_point(enum_scope:publicalerts.cap.Alert.MsgType)
  157. }
  158. public enum Scope
  159. implements com.google.protobuf.ProtocolMessageEnum {
  160. PUBLIC(0, 0),
  161. RESTRICTED(1, 1),
  162. PRIVATE(2, 2),
  163. ;
  164. public static final int PUBLIC_VALUE = 0;
  165. public static final int RESTRICTED_VALUE = 1;
  166. public static final int PRIVATE_VALUE = 2;
  167. public final int getNumber() { return value; }
  168. public static Scope valueOf(int value) {
  169. switch (value) {
  170. case 0: return PUBLIC;
  171. case 1: return RESTRICTED;
  172. case 2: return PRIVATE;
  173. default: return null;
  174. }
  175. }
  176. public static com.google.protobuf.Internal.EnumLiteMap<Scope>
  177. internalGetValueMap() {
  178. return internalValueMap;
  179. }
  180. private static com.google.protobuf.Internal.EnumLiteMap<Scope>
  181. internalValueMap =
  182. new com.google.protobuf.Internal.EnumLiteMap<Scope>() {
  183. public Scope findValueByNumber(int number) {
  184. return Scope.valueOf(number);
  185. }
  186. };
  187. public final com.google.protobuf.Descriptors.EnumValueDescriptor
  188. getValueDescriptor() {
  189. return getDescriptor().getValues().get(index);
  190. }
  191. public final com.google.protobuf.Descriptors.EnumDescriptor
  192. getDescriptorForType() {
  193. return getDescriptor();
  194. }
  195. public static final com.google.protobuf.Descriptors.EnumDescriptor
  196. getDescriptor() {
  197. return com.google.publicalerts.cap.Alert.getDescriptor().getEnumTypes().get(2);
  198. }
  199. private static final Scope[] VALUES = {
  200. PUBLIC, RESTRICTED, PRIVATE,
  201. };
  202. public static Scope valueOf(
  203. com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
  204. if (desc.getType() != getDescriptor()) {
  205. throw new java.lang.IllegalArgumentException(
  206. "EnumValueDescriptor is not for this type.");
  207. }
  208. return VALUES[desc.getIndex()];
  209. }
  210. private final int index;
  211. private final int value;
  212. private Scope(int index, int value) {
  213. this.index = index;
  214. this.value = value;
  215. }
  216. // @@protoc_insertion_point(enum_scope:publicalerts.cap.Alert.Scope)
  217. }
  218. private int bitField0_;
  219. // required string xmlns = 1;
  220. public static final int XMLNS_FIELD_NUMBER = 1;
  221. private java.lang.Object xmlns_;
  222. public boolean hasXmlns() {
  223. return ((bitField0_ & 0x00000001) == 0x00000001);
  224. }
  225. public String getXmlns() {
  226. java.lang.Object ref = xmlns_;
  227. if (ref instanceof String) {
  228. return (String) ref;
  229. } else {
  230. com.google.protobuf.ByteString bs =
  231. (com.google.protobuf.ByteString) ref;
  232. String s = bs.toStringUtf8();
  233. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  234. xmlns_ = s;
  235. }
  236. return s;
  237. }
  238. }
  239. private com.google.protobuf.ByteString getXmlnsBytes() {
  240. java.lang.Object ref = xmlns_;
  241. if (ref instanceof String) {
  242. com.google.protobuf.ByteString b =
  243. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  244. xmlns_ = b;
  245. return b;
  246. } else {
  247. return (com.google.protobuf.ByteString) ref;
  248. }
  249. }
  250. // required string identifier = 2;
  251. public static final int IDENTIFIER_FIELD_NUMBER = 2;
  252. private java.lang.Object identifier_;
  253. public boolean hasIdentifier() {
  254. return ((bitField0_ & 0x00000002) == 0x00000002);
  255. }
  256. public String getIdentifier() {
  257. java.lang.Object ref = identifier_;
  258. if (ref instanceof String) {
  259. return (String) ref;
  260. } else {
  261. com.google.protobuf.ByteString bs =
  262. (com.google.protobuf.ByteString) ref;
  263. String s = bs.toStringUtf8();
  264. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  265. identifier_ = s;
  266. }
  267. return s;
  268. }
  269. }
  270. private com.google.protobuf.ByteString getIdentifierBytes() {
  271. java.lang.Object ref = identifier_;
  272. if (ref instanceof String) {
  273. com.google.protobuf.ByteString b =
  274. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  275. identifier_ = b;
  276. return b;
  277. } else {
  278. return (com.google.protobuf.ByteString) ref;
  279. }
  280. }
  281. // required string sender = 3;
  282. public static final int SENDER_FIELD_NUMBER = 3;
  283. private java.lang.Object sender_;
  284. public boolean hasSender() {
  285. return ((bitField0_ & 0x00000004) == 0x00000004);
  286. }
  287. public String getSender() {
  288. java.lang.Object ref = sender_;
  289. if (ref instanceof String) {
  290. return (String) ref;
  291. } else {
  292. com.google.protobuf.ByteString bs =
  293. (com.google.protobuf.ByteString) ref;
  294. String s = bs.toStringUtf8();
  295. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  296. sender_ = s;
  297. }
  298. return s;
  299. }
  300. }
  301. private com.google.protobuf.ByteString getSenderBytes() {
  302. java.lang.Object ref = sender_;
  303. if (ref instanceof String) {
  304. com.google.protobuf.ByteString b =
  305. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  306. sender_ = b;
  307. return b;
  308. } else {
  309. return (com.google.protobuf.ByteString) ref;
  310. }
  311. }
  312. // optional string password = 4 [deprecated = true];
  313. public static final int PASSWORD_FIELD_NUMBER = 4;
  314. private java.lang.Object password_;
  315. @java.lang.Deprecated public boolean hasPassword() {
  316. return ((bitField0_ & 0x00000008) == 0x00000008);
  317. }
  318. @java.lang.Deprecated public String getPassword() {
  319. java.lang.Object ref = password_;
  320. if (ref instanceof String) {
  321. return (String) ref;
  322. } else {
  323. com.google.protobuf.ByteString bs =
  324. (com.google.protobuf.ByteString) ref;
  325. String s = bs.toStringUtf8();
  326. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  327. password_ = s;
  328. }
  329. return s;
  330. }
  331. }
  332. private com.google.protobuf.ByteString getPasswordBytes() {
  333. java.lang.Object ref = password_;
  334. if (ref instanceof String) {
  335. com.google.protobuf.ByteString b =
  336. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  337. password_ = b;
  338. return b;
  339. } else {
  340. return (com.google.protobuf.ByteString) ref;
  341. }
  342. }
  343. // required string sent = 5;
  344. public static final int SENT_FIELD_NUMBER = 5;
  345. private java.lang.Object sent_;
  346. public boolean hasSent() {
  347. return ((bitField0_ & 0x00000010) == 0x00000010);
  348. }
  349. public String getSent() {
  350. java.lang.Object ref = sent_;
  351. if (ref instanceof String) {
  352. return (String) ref;
  353. } else {
  354. com.google.protobuf.ByteString bs =
  355. (com.google.protobuf.ByteString) ref;
  356. String s = bs.toStringUtf8();
  357. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  358. sent_ = s;
  359. }
  360. return s;
  361. }
  362. }
  363. private com.google.protobuf.ByteString getSentBytes() {
  364. java.lang.Object ref = sent_;
  365. if (ref instanceof String) {
  366. com.google.protobuf.ByteString b =
  367. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  368. sent_ = b;
  369. return b;
  370. } else {
  371. return (com.google.protobuf.ByteString) ref;
  372. }
  373. }
  374. // required .publicalerts.cap.Alert.Status status = 6;
  375. public static final int STATUS_FIELD_NUMBER = 6;
  376. private com.google.publicalerts.cap.Alert.Status status_;
  377. public boolean hasStatus() {
  378. return ((bitField0_ & 0x00000020) == 0x00000020);
  379. }
  380. public com.google.publicalerts.cap.Alert.Status getStatus() {
  381. return status_;
  382. }
  383. // required .publicalerts.cap.Alert.MsgType msg_type = 7;
  384. public static final int MSG_TYPE_FIELD_NUMBER = 7;
  385. private com.google.publicalerts.cap.Alert.MsgType msgType_;
  386. public boolean hasMsgType() {
  387. return ((bitField0_ & 0x00000040) == 0x00000040);
  388. }
  389. public com.google.publicalerts.cap.Alert.MsgType getMsgType() {
  390. return msgType_;
  391. }
  392. // optional string source = 8;
  393. public static final int SOURCE_FIELD_NUMBER = 8;
  394. private java.lang.Object source_;
  395. public boolean hasSource() {
  396. return ((bitField0_ & 0x00000080) == 0x00000080);
  397. }
  398. public String getSource() {
  399. java.lang.Object ref = source_;
  400. if (ref instanceof String) {
  401. return (String) ref;
  402. } else {
  403. com.google.protobuf.ByteString bs =
  404. (com.google.protobuf.ByteString) ref;
  405. String s = bs.toStringUtf8();
  406. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  407. source_ = s;
  408. }
  409. return s;
  410. }
  411. }
  412. private com.google.protobuf.ByteString getSourceBytes() {
  413. java.lang.Object ref = source_;
  414. if (ref instanceof String) {
  415. com.google.protobuf.ByteString b =
  416. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  417. source_ = b;
  418. return b;
  419. } else {
  420. return (com.google.protobuf.ByteString) ref;
  421. }
  422. }
  423. // optional .publicalerts.cap.Alert.Scope scope = 9;
  424. public static final int SCOPE_FIELD_NUMBER = 9;
  425. private com.google.publicalerts.cap.Alert.Scope scope_;
  426. public boolean hasScope() {
  427. return ((bitField0_ & 0x00000100) == 0x00000100);
  428. }
  429. public com.google.publicalerts.cap.Alert.Scope getScope() {
  430. return scope_;
  431. }
  432. // optional string restriction = 10;
  433. public static final int RESTRICTION_FIELD_NUMBER = 10;
  434. private java.lang.Object restriction_;
  435. public boolean hasRestriction() {
  436. return ((bitField0_ & 0x00000200) == 0x00000200);
  437. }
  438. public String getRestriction() {
  439. java.lang.Object ref = restriction_;
  440. if (ref instanceof String) {
  441. return (String) ref;
  442. } else {
  443. com.google.protobuf.ByteString bs =
  444. (com.google.protobuf.ByteString) ref;
  445. String s = bs.toStringUtf8();
  446. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  447. restriction_ = s;
  448. }
  449. return s;
  450. }
  451. }
  452. private com.google.protobuf.ByteString getRestrictionBytes() {
  453. java.lang.Object ref = restriction_;
  454. if (ref instanceof String) {
  455. com.google.protobuf.ByteString b =
  456. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  457. restriction_ = b;
  458. return b;
  459. } else {
  460. return (com.google.protobuf.ByteString) ref;
  461. }
  462. }
  463. // optional .publicalerts.cap.Group addresses = 11;
  464. public static final int ADDRESSES_FIELD_NUMBER = 11;
  465. private com.google.publicalerts.cap.Group addresses_;
  466. public boolean hasAddresses() {
  467. return ((bitField0_ & 0x00000400) == 0x00000400);
  468. }
  469. public com.google.publicalerts.cap.Group getAddresses() {
  470. return addresses_;
  471. }
  472. public com.google.publicalerts.cap.GroupOrBuilder getAddressesOrBuilder() {
  473. return addresses_;
  474. }
  475. // repeated string code = 12;
  476. public static final int CODE_FIELD_NUMBER = 12;
  477. private com.google.protobuf.LazyStringList code_;
  478. public java.util.List<String>
  479. getCodeList() {
  480. return code_;
  481. }
  482. public int getCodeCount() {
  483. return code_.size();
  484. }
  485. public String getCode(int index) {
  486. return code_.get(index);
  487. }
  488. // optional string note = 13;
  489. public static final int NOTE_FIELD_NUMBER = 13;
  490. private java.lang.Object note_;
  491. public boolean hasNote() {
  492. return ((bitField0_ & 0x00000800) == 0x00000800);
  493. }
  494. public String getNote() {
  495. java.lang.Object ref = note_;
  496. if (ref instanceof String) {
  497. return (String) ref;
  498. } else {
  499. com.google.protobuf.ByteString bs =
  500. (com.google.protobuf.ByteString) ref;
  501. String s = bs.toStringUtf8();
  502. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  503. note_ = s;
  504. }
  505. return s;
  506. }
  507. }
  508. private com.google.protobuf.ByteString getNoteBytes() {
  509. java.lang.Object ref = note_;
  510. if (ref instanceof String) {
  511. com.google.protobuf.ByteString b =
  512. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  513. note_ = b;
  514. return b;
  515. } else {
  516. return (com.google.protobuf.ByteString) ref;
  517. }
  518. }
  519. // optional .publicalerts.cap.Group references = 14;
  520. public static final int REFERENCES_FIELD_NUMBER = 14;
  521. private com.google.publicalerts.cap.Group references_;
  522. public boolean hasReferences() {
  523. return ((bitField0_ & 0x00001000) == 0x00001000);
  524. }
  525. public com.google.publicalerts.cap.Group getReferences() {
  526. return references_;
  527. }
  528. public com.google.publicalerts.cap.GroupOrBuilder getReferencesOrBuilder() {
  529. return references_;
  530. }
  531. // optional .publicalerts.cap.Group incidents = 15;
  532. public static final int INCIDENTS_FIELD_NUMBER = 15;
  533. private com.google.publicalerts.cap.Group incidents_;
  534. public boolean hasIncidents() {
  535. return ((bitField0_ & 0x00002000) == 0x00002000);
  536. }
  537. public com.google.publicalerts.cap.Group getIncidents() {
  538. return incidents_;
  539. }
  540. public com.google.publicalerts.cap.GroupOrBuilder getIncidentsOrBuilder() {
  541. return incidents_;
  542. }
  543. // repeated .publicalerts.cap.Info info = 16;
  544. public static final int INFO_FIELD_NUMBER = 16;
  545. private java.util.List<com.google.publicalerts.cap.Info> info_;
  546. public java.util.List<com.google.publicalerts.cap.Info> getInfoList() {
  547. return info_;
  548. }
  549. public java.util.List<? extends com.google.publicalerts.cap.InfoOrBuilder>
  550. getInfoOrBuilderList() {
  551. return info_;
  552. }
  553. public int getInfoCount() {
  554. return info_.size();
  555. }
  556. public com.google.publicalerts.cap.Info getInfo(int index) {
  557. return info_.get(index);
  558. }
  559. public com.google.publicalerts.cap.InfoOrBuilder getInfoOrBuilder(
  560. int index) {
  561. return info_.get(index);
  562. }
  563. private void initFields() {
  564. xmlns_ = "";
  565. identifier_ = "";
  566. sender_ = "";
  567. password_ = "";
  568. sent_ = "";
  569. status_ = com.google.publicalerts.cap.Alert.Status.ACTUAL;
  570. msgType_ = com.google.publicalerts.cap.Alert.MsgType.ALERT;
  571. source_ = "";
  572. scope_ = com.google.publicalerts.cap.Alert.Scope.PUBLIC;
  573. restriction_ = "";
  574. addresses_ = com.google.publicalerts.cap.Group.getDefaultInstance();
  575. code_ = com.google.protobuf.LazyStringArrayList.EMPTY;
  576. note_ = "";
  577. references_ = com.google.publicalerts.cap.Group.getDefaultInstance();
  578. incidents_ = com.google.publicalerts.cap.Group.getDefaultInstance();
  579. info_ = java.util.Collections.emptyList();
  580. }
  581. private byte memoizedIsInitialized = -1;
  582. public final boolean isInitialized() {
  583. byte isInitialized = memoizedIsInitialized;
  584. if (isInitialized != -1) return isInitialized == 1;
  585. if (!hasXmlns()) {
  586. memoizedIsInitialized = 0;
  587. return false;
  588. }
  589. if (!hasIdentifier()) {
  590. memoizedIsInitialized = 0;
  591. return false;
  592. }
  593. if (!hasSender()) {
  594. memoizedIsInitialized = 0;
  595. return false;
  596. }
  597. if (!hasSent()) {
  598. memoizedIsInitialized = 0;
  599. return false;
  600. }
  601. if (!hasStatus()) {
  602. memoizedIsInitialized = 0;
  603. return false;
  604. }
  605. if (!hasMsgType()) {
  606. memoizedIsInitialized = 0;
  607. return false;
  608. }
  609. for (int i = 0; i < getInfoCount(); i++) {
  610. if (!getInfo(i).isInitialized()) {
  611. memoizedIsInitialized = 0;
  612. return false;
  613. }
  614. }
  615. memoizedIsInitialized = 1;
  616. return true;
  617. }
  618. public void writeTo(com.google.protobuf.CodedOutputStream output)
  619. throws java.io.IOException {
  620. getSerializedSize();
  621. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  622. output.writeBytes(1, getXmlnsBytes());
  623. }
  624. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  625. output.writeBytes(2, getIdentifierBytes());
  626. }
  627. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  628. output.writeBytes(3, getSenderBytes());
  629. }
  630. if (((bitField0_ & 0x00000008) == 0x00000008)) {
  631. output.writeBytes(4, getPasswordBytes());
  632. }
  633. if (((bitField0_ & 0x00000010) == 0x00000010)) {
  634. output.writeBytes(5, getSentBytes());
  635. }
  636. if (((bitField0_ & 0x00000020) == 0x00000020)) {
  637. output.writeEnum(6, status_.getNumber());
  638. }
  639. if (((bitField0_ & 0x00000040) == 0x00000040)) {
  640. output.writeEnum(7, msgType_.getNumber());
  641. }
  642. if (((bitField0_ & 0x00000080) == 0x00000080)) {
  643. output.writeBytes(8, getSourceBytes());
  644. }
  645. if (((bitField0_ & 0x00000100) == 0x00000100)) {
  646. output.writeEnum(9, scope_.getNumber());
  647. }
  648. if (((bitField0_ & 0x00000200) == 0x00000200)) {
  649. output.writeBytes(10, getRestrictionBytes());
  650. }
  651. if (((bitField0_ & 0x00000400) == 0x00000400)) {
  652. output.writeMessage(11, addresses_);
  653. }
  654. for (int i = 0; i < code_.size(); i++) {
  655. output.writeBytes(12, code_.getByteString(i));
  656. }
  657. if (((bitField0_ & 0x00000800) == 0x00000800)) {
  658. output.writeBytes(13, getNoteBytes());
  659. }
  660. if (((bitField0_ & 0x00001000) == 0x00001000)) {
  661. output.writeMessage(14, references_);
  662. }
  663. if (((bitField0_ & 0x00002000) == 0x00002000)) {
  664. output.writeMessage(15, incidents_);
  665. }
  666. for (int i = 0; i < info_.size(); i++) {
  667. output.writeMessage(16, info_.get(i));
  668. }
  669. getUnknownFields().writeTo(output);
  670. }
  671. private int memoizedSerializedSize = -1;
  672. public int getSerializedSize() {
  673. int size = memoizedSerializedSize;
  674. if (size != -1) return size;
  675. size = 0;
  676. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  677. size += com.google.protobuf.CodedOutputStream
  678. .computeBytesSize(1, getXmlnsBytes());
  679. }
  680. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  681. size += com.google.protobuf.CodedOutputStream
  682. .computeBytesSize(2, getIdentifierBytes());
  683. }
  684. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  685. size += com.google.protobuf.CodedOutputStream
  686. .computeBytesSize(3, getSenderBytes());
  687. }
  688. if (((bitField0_ & 0x00000008) == 0x00000008)) {
  689. size += com.google.protobuf.CodedOutputStream
  690. .computeBytesSize(4, getPasswordBytes());
  691. }
  692. if (((bitField0_ & 0x00000010) == 0x00000010)) {
  693. size += com.google.protobuf.CodedOutputStream
  694. .computeBytesSize(5, getSentBytes());
  695. }
  696. if (((bitField0_ & 0x00000020) == 0x00000020)) {
  697. size += com.google.protobuf.CodedOutputStream
  698. .computeEnumSize(6, status_.getNumber());
  699. }
  700. if (((bitField0_ & 0x00000040) == 0x00000040)) {
  701. size += com.google.protobuf.CodedOutputStream
  702. .computeEnumSize(7, msgType_.getNumber());
  703. }
  704. if (((bitField0_ & 0x00000080) == 0x00000080)) {
  705. size += com.google.protobuf.CodedOutputStream
  706. .computeBytesSize(8, getSourceBytes());
  707. }
  708. if (((bitField0_ & 0x00000100) == 0x00000100)) {
  709. size += com.google.protobuf.CodedOutputStream
  710. .computeEnumSize(9, scope_.getNumber());
  711. }
  712. if (((bitField0_ & 0x00000200) == 0x00000200)) {
  713. size += com.google.protobuf.CodedOutputStream
  714. .computeBytesSize(10, getRestrictionBytes());
  715. }
  716. if (((bitField0_ & 0x00000400) == 0x00000400)) {
  717. size += com.google.protobuf.CodedOutputStream
  718. .computeMessageSize(11, addresses_);
  719. }
  720. {
  721. int dataSize = 0;
  722. for (int i = 0; i < code_.size(); i++) {
  723. dataSize += com.google.protobuf.CodedOutputStream
  724. .computeBytesSizeNoTag(code_.getByteString(i));
  725. }
  726. size += dataSize;
  727. size += 1 * getCodeList().size();
  728. }
  729. if (((bitField0_ & 0x00000800) == 0x00000800)) {
  730. size += com.google.protobuf.CodedOutputStream
  731. .computeBytesSize(13, getNoteBytes());
  732. }
  733. if (((bitField0_ & 0x00001000) == 0x00001000)) {
  734. size += com.google.protobuf.CodedOutputStream
  735. .computeMessageSize(14, references_);
  736. }
  737. if (((bitField0_ & 0x00002000) == 0x00002000)) {
  738. size += com.google.protobuf.CodedOutputStream
  739. .computeMessageSize(15, incidents_);
  740. }
  741. for (int i = 0; i < info_.size(); i++) {
  742. size += com.google.protobuf.CodedOutputStream
  743. .computeMessageSize(16, info_.get(i));
  744. }
  745. size += getUnknownFields().getSerializedSize();
  746. memoizedSerializedSize = size;
  747. return size;
  748. }
  749. private static final long serialVersionUID = 0L;
  750. @java.lang.Override
  751. protected java.lang.Object writeReplace()
  752. throws java.io.ObjectStreamException {
  753. return super.writeReplace();
  754. }
  755. @java.lang.Override
  756. public boolean equals(final java.lang.Object obj) {
  757. if (obj == this) {
  758. return true;
  759. }
  760. if (!(obj instanceof com.google.publicalerts.cap.Alert)) {
  761. return super.equals(obj);
  762. }
  763. com.google.publicalerts.cap.Alert other = (com.google.publicalerts.cap.Alert) obj;
  764. boolean result = true;
  765. result = result && (hasXmlns() == other.hasXmlns());
  766. if (hasXmlns()) {
  767. result = result && getXmlns()
  768. .equals(other.getXmlns());
  769. }
  770. result = result && (hasIdentifier() == other.hasIdentifier());
  771. if (hasIdentifier()) {
  772. result = result && getIdentifier()
  773. .equals(other.getIdentifier());
  774. }
  775. result = result && (hasSender() == other.hasSender());
  776. if (hasSender()) {
  777. result = result && getSender()
  778. .equals(other.getSender());
  779. }
  780. result = result && (hasPassword() == other.hasPassword());
  781. if (hasPassword()) {
  782. result = result && getPassword()
  783. .equals(other.getPassword());
  784. }
  785. result = result && (hasSent() == other.hasSent());
  786. if (hasSent()) {
  787. result = result && getSent()
  788. .equals(other.getSent());
  789. }
  790. result = result && (hasStatus() == other.hasStatus());
  791. if (hasStatus()) {
  792. result = result &&
  793. (getStatus() == other.getStatus());
  794. }
  795. result = result && (hasMsgType() == other.hasMsgType());
  796. if (hasMsgType()) {
  797. result = result &&
  798. (getMsgType() == other.getMsgType());
  799. }
  800. result = result && (hasSource() == other.hasSource());
  801. if (hasSource()) {
  802. result = result && getSource()
  803. .equals(other.getSource());
  804. }
  805. result = result && (hasScope() == other.hasScope());
  806. if (hasScope()) {
  807. result = result &&
  808. (getScope() == other.getScope());
  809. }
  810. result = result && (hasRestriction() == other.hasRestriction());
  811. if (hasRestriction()) {
  812. result = result && getRestriction()
  813. .equals(other.getRestriction());
  814. }
  815. result = result && (hasAddresses() == other.hasAddresses());
  816. if (hasAddresses()) {
  817. result = result && getAddresses()
  818. .equals(other.getAddresses());
  819. }
  820. result = result && getCodeList()
  821. .equals(other.getCodeList());
  822. result = result && (hasNote() == other.hasNote());
  823. if (hasNote()) {
  824. result = result && getNote()
  825. .equals(other.getNote());
  826. }
  827. result = result && (hasReferences() == other.hasReferences());
  828. if (hasReferences()) {
  829. result = result && getReferences()
  830. .equals(other.getReferences());
  831. }
  832. result = result && (hasIncidents() == other.hasIncidents());
  833. if (hasIncidents()) {
  834. result = result && getIncidents()
  835. .equals(other.getIncidents());
  836. }
  837. result = result && getInfoList()
  838. .equals(other.getInfoList());
  839. result = result &&
  840. getUnknownFields().equals(other.getUnknownFields());
  841. return result;
  842. }
  843. @java.lang.Override
  844. public int hashCode() {
  845. int hash = 41;
  846. hash = (19 * hash) + getDescriptorForType().hashCode();
  847. if (hasXmlns()) {
  848. hash = (37 * hash) + XMLNS_FIELD_NUMBER;
  849. hash = (53 * hash) + getXmlns().hashCode();
  850. }
  851. if (hasIdentifier()) {
  852. hash = (37 * hash) + IDENTIFIER_FIELD_NUMBER;
  853. hash = (53 * hash) + getIdentifier().hashCode();
  854. }
  855. if (hasSender()) {
  856. hash = (37 * hash) + SENDER_FIELD_NUMBER;
  857. hash = (53 * hash) + getSender().hashCode();
  858. }
  859. if (hasPassword()) {
  860. hash = (37 * hash) + PASSWORD_FIELD_NUMBER;
  861. hash = (53 * hash) + getPassword().hashCode();
  862. }
  863. if (hasSent()) {
  864. hash = (37 * hash) + SENT_FIELD_NUMBER;
  865. hash = (53 * hash) + getSent().hashCode();
  866. }
  867. if (hasStatus()) {
  868. hash = (37 * hash) + STATUS_FIELD_NUMBER;
  869. hash = (53 * hash) + hashEnum(getStatus());
  870. }
  871. if (hasMsgType()) {
  872. hash = (37 * hash) + MSG_TYPE_FIELD_NUMBER;
  873. hash = (53 * hash) + hashEnum(getMsgType());
  874. }
  875. if (hasSource()) {
  876. hash = (37 * hash) + SOURCE_FIELD_NUMBER;
  877. hash = (53 * hash) + getSource().hashCode();
  878. }
  879. if (hasScope()) {
  880. hash = (37 * hash) + SCOPE_FIELD_NUMBER;
  881. hash = (53 * hash) + hashEnum(getScope());
  882. }
  883. if (hasRestriction()) {
  884. hash = (37 * hash) + RESTRICTION_FIELD_NUMBER;
  885. hash = (53 * hash) + getRestriction().hashCode();
  886. }
  887. if (hasAddresses()) {
  888. hash = (37 * hash) + ADDRESSES_FIELD_NUMBER;
  889. hash = (53 * hash) + getAddresses().hashCode();
  890. }
  891. if (getCodeCount() > 0) {
  892. hash = (37 * hash) + CODE_FIELD_NUMBER;
  893. hash = (53 * hash) + getCodeList().hashCode();
  894. }
  895. if (hasNote()) {
  896. hash = (37 * hash) + NOTE_FIELD_NUMBER;
  897. hash = (53 * hash) + getNote().hashCode();
  898. }
  899. if (hasReferences()) {
  900. hash = (37 * hash) + REFERENCES_FIELD_NUMBER;
  901. hash = (53 * hash) + getReferences().hashCode();
  902. }
  903. if (hasIncidents()) {
  904. hash = (37 * hash) + INCIDENTS_FIELD_NUMBER;
  905. hash = (53 * hash) + getIncidents().hashCode();
  906. }
  907. if (getInfoCount() > 0) {
  908. hash = (37 * hash) + INFO_FIELD_NUMBER;
  909. hash = (53 * hash) + getInfoList().hashCode();
  910. }
  911. hash = (29 * hash) + getUnknownFields().hashCode();
  912. return hash;
  913. }
  914. public static com.google.publicalerts.cap.Alert parseFrom(
  915. com.google.protobuf.ByteString data)
  916. throws com.google.protobuf.InvalidProtocolBufferException {
  917. return newBuilder().mergeFrom(data).buildParsed();
  918. }
  919. public static com.google.publicalerts.cap.Alert parseFrom(
  920. com.google.protobuf.ByteString data,
  921. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  922. throws com.google.protobuf.InvalidProtocolBufferException {
  923. return newBuilder().mergeFrom(data, extensionRegistry)
  924. .buildParsed();
  925. }
  926. public static com.google.publicalerts.cap.Alert parseFrom(byte[] data)
  927. throws com.google.protobuf.InvalidProtocolBufferException {
  928. return newBuilder().mergeFrom(data).buildParsed();
  929. }
  930. public static com.google.publicalerts.cap.Alert parseFrom(
  931. byte[] data,
  932. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  933. throws com.google.protobuf.InvalidProtocolBufferException {
  934. return newBuilder().mergeFrom(data, extensionRegistry)
  935. .buildParsed();
  936. }
  937. public static com.google.publicalerts.cap.Alert parseFrom(java.io.InputStream input)
  938. throws java.io.IOException {
  939. return newBuilder().mergeFrom(input).buildParsed();
  940. }
  941. public static com.google.publicalerts.cap.Alert parseFrom(
  942. java.io.InputStream input,
  943. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  944. throws java.io.IOException {
  945. return newBuilder().mergeFrom(input, extensionRegistry)
  946. .buildParsed();
  947. }
  948. public static com.google.publicalerts.cap.Alert parseDelimitedFrom(java.io.InputStream input)
  949. throws java.io.IOException {
  950. Builder builder = newBuilder();
  951. if (builder.mergeDelimitedFrom(input)) {
  952. return builder.buildParsed();
  953. } else {
  954. return null;
  955. }
  956. }
  957. public static com.google.publicalerts.cap.Alert parseDelimitedFrom(
  958. java.io.InputStream input,
  959. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  960. throws java.io.IOException {
  961. Builder builder = newBuilder();
  962. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  963. return builder.buildParsed();
  964. } else {
  965. return null;
  966. }
  967. }
  968. public static com.google.publicalerts.cap.Alert parseFrom(
  969. com.google.protobuf.CodedInputStream input)
  970. throws java.io.IOException {
  971. return newBuilder().mergeFrom(input).buildParsed();
  972. }
  973. public static com.google.publicalerts.cap.Alert parseFrom(
  974. com.google.protobuf.CodedInputStream input,
  975. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  976. throws java.io.IOException {
  977. return newBuilder().mergeFrom(input, extensionRegistry)
  978. .buildParsed();
  979. }
  980. public static Builder newBuilder() { return Builder.create(); }
  981. public Builder newBuilderForType() { return newBuilder(); }
  982. public static Builder newBuilder(com.google.publicalerts.cap.Alert prototype) {
  983. return newBuilder().mergeFrom(prototype);
  984. }
  985. public Builder toBuilder() { return newBuilder(this); }
  986. @java.lang.Override
  987. protected Builder newBuilderForType(
  988. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  989. Builder builder = new Builder(parent);
  990. return builder;
  991. }
  992. public static final class Builder extends
  993. com.google.protobuf.GeneratedMessage.Builder<Builder>
  994. implements com.google.publicalerts.cap.AlertOrBuilder {
  995. public static final com.google.protobuf.Descriptors.Descriptor
  996. getDescriptor() {
  997. return com.google.publicalerts.cap.Cap.internal_static_publicalerts_cap_Alert_descriptor;
  998. }
  999. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1000. internalGetFieldAccessorTable() {
  1001. return com.google.publicalerts.cap.Cap.internal_static_publicalerts_cap_Alert_fieldAccessorTable;
  1002. }
  1003. // Construct using com.google.publicalerts.cap.Alert.newBuilder()
  1004. private Builder() {
  1005. maybeForceBuilderInitialization();
  1006. }
  1007. private Builder(BuilderParent parent) {
  1008. super(parent);
  1009. maybeForceBuilderInitialization();
  1010. }
  1011. private void maybeForceBuilderInitialization() {
  1012. if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
  1013. getAddressesFieldBuilder();
  1014. getReferencesFieldBuilder();
  1015. getIncidentsFieldBuilder();
  1016. getInfoFieldBuilder();
  1017. }
  1018. }
  1019. private static Builder create() {
  1020. return new Builder();
  1021. }
  1022. public Builder clear() {
  1023. super.clear();
  1024. xmlns_ = "";
  1025. bitField0_ = (bitField0_ & ~0x00000001);
  1026. identifier_ = "";
  1027. bitField0_ = (bitField0_ & ~0x00000002);
  1028. sender_ = "";
  1029. bitField0_ = (bitField0_ & ~0x00000004);
  1030. password_ = "";
  1031. bitField0_ = (bitField0_ & ~0x00000008);
  1032. sent_ = "";
  1033. bitField0_ = (bitField0_ & ~0x00000010);
  1034. status_ = com.google.publicalerts.cap.Alert.Status.ACTUAL;
  1035. bitField0_ = (bitField0_ & ~0x00000020);
  1036. msgType_ = com.google.publicalerts.cap.Alert.MsgType.ALERT;
  1037. bitField0_ = (bitField0_ & ~0x00000040);
  1038. source_ = "";
  1039. bitField0_ = (bitField0_ & ~0x00000080);
  1040. scope_ = com.google.publicalerts.cap.Alert.Scope.PUBLIC;
  1041. bitField0_ = (bitField0_ & ~0x00000100);
  1042. restriction_ = "";
  1043. bitField0_ = (bitField0_ & ~0x00000200);
  1044. if (addressesBuilder_ == null) {
  1045. addresses_ = com.google.publicalerts.cap.Group.getDefaultInstance();
  1046. } else {
  1047. addressesBuilder_.clear();
  1048. }
  1049. bitField0_ = (bitField0_ & ~0x00000400);
  1050. code_ = com.google.protobuf.LazyStringArrayList.EMPTY;
  1051. bitField0_ = (bitField0_ & ~0x00000800);
  1052. note_ = "";
  1053. bitField0_ = (bitField0_ & ~0x00001000);
  1054. if (referencesBuilder_ == null) {
  1055. references_ = com.google.publicalerts.cap.Group.getDefaultInstance();
  1056. } else {
  1057. referencesBuilder_.clear();
  1058. }
  1059. bitField0_ = (bitField0_ & ~0x00002000);
  1060. if (incidentsBuilder_ == null) {
  1061. incidents_ = com.google.publicalerts.cap.Group.getDefaultInstance();
  1062. } else {
  1063. incidentsBuilder_.clear();
  1064. }
  1065. bitField0_ = (bitField0_ & ~0x00004000);
  1066. if (infoBuilder_ == null) {
  1067. info_ = java.util.Collections.emptyList();
  1068. bitField0_ = (bitField0_ & ~0x00008000);
  1069. } else {
  1070. infoBuilder_.clear();
  1071. }
  1072. return this;
  1073. }
  1074. public Builder clone() {
  1075. return create().mergeFrom(buildPartial());
  1076. }
  1077. public com.google.protobuf.Descriptors.Descriptor
  1078. getDescriptorForType() {
  1079. return com.google.publicalerts.cap.Alert.getDescriptor();
  1080. }
  1081. public com.google.publicalerts.cap.Alert getDefaultInstanceForType() {
  1082. return com.google.publicalerts.cap.Alert.getDefaultInstance();
  1083. }
  1084. public com.google.publicalerts.cap.Alert build() {
  1085. com.google.publicalerts.cap.Alert result = buildPartial();
  1086. if (!result.isInitialized()) {
  1087. throw newUninitializedMessageException(result);
  1088. }
  1089. return result;
  1090. }
  1091. private com.google.publicalerts.cap.Alert buildParsed()
  1092. throws com.google.protobuf.InvalidProtocolBufferException {
  1093. com.google.publicalerts.cap.Alert result = buildPartial();
  1094. if (!result.isInitialized()) {
  1095. throw newUninitializedMessageException(
  1096. result).asInvalidProtocolBufferException();
  1097. }
  1098. return result;
  1099. }
  1100. public com.google.publicalerts.cap.Alert buildPartial() {
  1101. com.google.publicalerts.cap.Alert result = new com.google.publicalerts.cap.Alert(this);
  1102. int from_bitField0_ = bitField0_;
  1103. int to_bitField0_ = 0;
  1104. if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
  1105. to_bitField0_ |= 0x00000001;
  1106. }
  1107. result.xmlns_ = xmlns_;
  1108. if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
  1109. to_bitField0_ |= 0x00000002;
  1110. }
  1111. result.identifier_ = identifier_;
  1112. if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
  1113. to_bitField0_ |= 0x00000004;
  1114. }
  1115. result.sender_ = sender_;
  1116. if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
  1117. to_bitField0_ |= 0x00000008;
  1118. }
  1119. result.password_ = password_;
  1120. if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
  1121. to_bitField0_ |= 0x00000010;
  1122. }
  1123. result.sent_ = sent_;
  1124. if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
  1125. to_bitField0_ |= 0x00000020;
  1126. }
  1127. result.status_ = status_;
  1128. if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
  1129. to_bitField0_ |= 0x00000040;
  1130. }
  1131. result.msgType_ = msgType_;
  1132. if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
  1133. to_bitField0_ |= 0x00000080;
  1134. }
  1135. result.source_ = source_;
  1136. if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
  1137. to_bitField0_ |= 0x00000100;
  1138. }
  1139. result.scope_ = scope_;
  1140. if (((from_bitField0_ & 0x00000200) == 0x00000200)) {
  1141. to_bitField0_ |= 0x00000200;
  1142. }
  1143. result.restriction_ = restriction_;
  1144. if (((from_bitField0_ & 0x00000400) == 0x00000400)) {
  1145. to_bitField0_ |= 0x00000400;
  1146. }
  1147. if (addressesBuilder_ == null) {
  1148. result.addresses_ = addresses_;
  1149. } else {
  1150. result.addresses_ = addressesBuilder_.build();
  1151. }
  1152. if (((bitField0_ & 0x00000800) == 0x00000800)) {
  1153. code_ = new com.google.protobuf.UnmodifiableLazyStringList(
  1154. code_);
  1155. bitField0_ = (bitField0_ & ~0x00000800);
  1156. }
  1157. result.code_ = code_;
  1158. if (((from_bitField0_ & 0x00001000) == 0x00001000)) {
  1159. to_bitField0_ |= 0x00000800;
  1160. }
  1161. result.note_ = note_;
  1162. if (((from_bitField0_ & 0x00002000) == 0x00002000)) {
  1163. to_bitField0_ |= 0x00001000;
  1164. }
  1165. if (referencesBuilder_ == null) {
  1166. result.references_ = references_;
  1167. } else {
  1168. result.references_ = referencesBuilder_.build();
  1169. }
  1170. if (((from_bitField0_ & 0x00004000) == 0x00004000)) {
  1171. to_bitField0_ |= 0x00002000;
  1172. }
  1173. if (incidentsBuilder_ == null) {
  1174. result.incidents_ = incidents_;
  1175. } else {
  1176. result.incidents_ = incidentsBuilder_.build();
  1177. }
  1178. if (infoBuilder_ == null) {
  1179. if (((bitField0_ & 0x00008000) == 0x00008000)) {
  1180. info_ = java.util.Collections.unmodifiableList(info_);
  1181. bitField0_ = (bitField0_ & ~0x00008000);
  1182. }
  1183. result.info_ = info_;
  1184. } else {
  1185. result.info_ = infoBuilder_.build();
  1186. }
  1187. result.bitField0_ = to_bitField0_;
  1188. onBuilt();
  1189. return result;
  1190. }
  1191. public Builder mergeFrom(com.google.protobuf.Message other) {
  1192. if (other instanceof com.google.publicalerts.cap.Alert) {
  1193. return mergeFrom((com.google.publicalerts.cap.Alert)other);
  1194. } else {
  1195. super.mergeFrom(other);
  1196. return this;
  1197. }
  1198. }
  1199. public Builder mergeFrom(com.google.publicalerts.cap.Alert other) {
  1200. if (other == com.google.publicalerts.cap.Alert.getDefaultInstance()) return this;
  1201. if (other.hasXmlns()) {
  1202. setXmlns(other.getXmlns());
  1203. }
  1204. if (other.hasIdentifier()) {
  1205. setIdentifier(other.getIdentifier());
  1206. }
  1207. if (other.hasSender()) {
  1208. setSender(other.getSender());
  1209. }
  1210. if (other.hasPassword()) {
  1211. setPassword(other.getPassword());
  1212. }
  1213. if (other.hasSent()) {
  1214. setSent(other.getSent());
  1215. }
  1216. if (other.hasStatus()) {
  1217. setStatus(other.getStatus());
  1218. }
  1219. if (other.hasMsgType()) {
  1220. setMsgType(other.getMsgType());
  1221. }
  1222. if (other.hasSource()) {
  1223. setSource(other.getSource());
  1224. }
  1225. if (other.hasScope()) {
  1226. setScope(other.getScope());
  1227. }
  1228. if (other.hasRestriction()) {
  1229. setRestriction(other.getRestriction());
  1230. }
  1231. if (other.hasAddresses()) {
  1232. mergeAddresses(other.getAddresses());
  1233. }
  1234. if (!other.code_.isEmpty()) {
  1235. if (code_.isEmpty()) {
  1236. code_ = other.code_;
  1237. bitField0_ = (bitField0_ & ~0x00000800);
  1238. } else {
  1239. ensureCodeIsMutable();
  1240. code_.addAll(other.code_);
  1241. }
  1242. onChanged();
  1243. }
  1244. if (other.hasNote()) {
  1245. setNote(other.getNote());
  1246. }
  1247. if (other.hasReferences()) {
  1248. mergeReferences(other.getReferences());
  1249. }
  1250. if (other.hasIncidents()) {
  1251. mergeIncidents(other.getIncidents());
  1252. }
  1253. if (infoBuilder_ == null) {
  1254. if (!other.info_.isEmpty()) {
  1255. if (info_.isEmpty()) {
  1256. info_ = other.info_;
  1257. bitField0_ = (bitField0_ & ~0x00008000);
  1258. } else {
  1259. ensureInfoIsMutable();
  1260. info_.addAll(other.info_);
  1261. }
  1262. onChanged();
  1263. }
  1264. } else {
  1265. if (!other.info_.isEmpty()) {
  1266. if (infoBuilder_.isEmpty()) {
  1267. infoBuilder_.dispose();
  1268. infoBuilder_ = null;
  1269. info_ = other.info_;
  1270. bitField0_ = (bitField0_ & ~0x00008000);
  1271. infoBuilder_ =
  1272. com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
  1273. getInfoFieldBuilder() : null;
  1274. } else {
  1275. infoBuilder_.addAllMessages(other.info_);
  1276. }
  1277. }
  1278. }
  1279. this.mergeUnknownFields(other.getUnknownFields());
  1280. return this;
  1281. }
  1282. public final boolean isInitialized() {
  1283. if (!hasXmlns()) {
  1284. return false;
  1285. }
  1286. if (!hasIdentifier()) {
  1287. return false;
  1288. }
  1289. if (!hasSender()) {
  1290. return false;
  1291. }
  1292. if (!hasSent()) {
  1293. return false;
  1294. }
  1295. if (!hasStatus()) {
  1296. return false;
  1297. }
  1298. if (!hasMsgType()) {
  1299. return false;
  1300. }
  1301. for (int i = 0; i < getInfoCount(); i++) {
  1302. if (!getInfo(i).isInitialized()) {
  1303. return false;
  1304. }
  1305. }
  1306. return true;
  1307. }
  1308. public Builder mergeFrom(
  1309. com.google.protobuf.CodedInputStream input,
  1310. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1311. throws java.io.IOException {
  1312. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  1313. com.google.protobuf.UnknownFieldSet.newBuilder(
  1314. this.getUnknownFields());
  1315. while (true) {
  1316. int tag = input.readTag();
  1317. switch (tag) {
  1318. case 0:
  1319. this.setUnknownFields(unknownFields.build());
  1320. onChanged();
  1321. return this;
  1322. default: {
  1323. if (!parseUnknownField(input, unknownFields,
  1324. extensionRegistry, tag)) {
  1325. this.setUnknownFields(unknownFields.build());
  1326. onChanged();
  1327. return this;
  1328. }
  1329. break;
  1330. }
  1331. case 10: {
  1332. bitField0_ |= 0x00000001;
  1333. xmlns_ = input.readBytes();
  1334. break;
  1335. }
  1336. case 18: {
  1337. bitField0_ |= 0x00000002;
  1338. identifier_ = input.readBytes();
  1339. break;
  1340. }
  1341. case 26: {
  1342. bitField0_ |= 0x00000004;
  1343. sender_ = input.readBytes();
  1344. break;
  1345. }
  1346. case 34: {
  1347. bitField0_ |= 0x00000008;
  1348. password_ = input.readBytes();
  1349. break;
  1350. }
  1351. case 42: {
  1352. bitField0_ |= 0x00000010;
  1353. sent_ = input.readBytes();
  1354. break;
  1355. }
  1356. case 48: {
  1357. int rawValue = input.readEnum();
  1358. com.google.publicalerts.cap.Alert.Status value = com.google.publicalerts.cap.Alert.Status.valueOf(rawValue);
  1359. if (value == null) {
  1360. unknownFields.mergeVarintField(6, rawValue);
  1361. } else {
  1362. bitField0_ |= 0x00000020;
  1363. status_ = value;
  1364. }
  1365. break;
  1366. }
  1367. case 56: {
  1368. int rawValue = input.readEnum();
  1369. com.google.publicalerts.cap.Alert.MsgType value = com.google.publicalerts.cap.Alert.MsgType.valueOf(rawValue);
  1370. if (value == null) {
  1371. unknownFields.mergeVarintField(7, rawValue);
  1372. } else {
  1373. bitField0_ |= 0x00000040;
  1374. msgType_ = value;
  1375. }
  1376. break;
  1377. }
  1378. case 66: {
  1379. bitField0_ |= 0x00000080;
  1380. source_ = input.readBytes();
  1381. break;
  1382. }
  1383. case 72: {
  1384. int rawValue = input.readEnum();
  1385. com.google.publicalerts.cap.Alert.Scope value = com.google.publicalerts.cap.Alert.Scope.valueOf(rawValue);
  1386. if (value == null) {
  1387. unknownFields.mergeVarintField(9, rawValue);
  1388. } else {
  1389. bitField0_ |= 0x00000100;
  1390. scope_ = value;
  1391. }
  1392. break;
  1393. }
  1394. case 82: {
  1395. bitField0_ |= 0x00000200;
  1396. restriction_ = input.readBytes();
  1397. break;
  1398. }
  1399. case 90: {
  1400. com.google.publicalerts.cap.Group.Builder subBuilder = com.google.publicalerts.cap.Group.newBuilder();
  1401. if (hasAddresses()) {
  1402. subBuilder.mergeFrom(getAddresses());
  1403. }
  1404. input.readMessage(subBuilder, extensionRegistry);
  1405. setAddresses(subBuilder.buildPartial());
  1406. break;
  1407. }
  1408. case 98: {
  1409. ensureCodeIsMutable();
  1410. code_.add(input.readBytes());
  1411. break;
  1412. }
  1413. case 106: {
  1414. bitField0_ |= 0x00001000;
  1415. note_ = input.readBytes();
  1416. break;
  1417. }
  1418. case 114: {
  1419. com.google.publicalerts.cap.Group.Builder subBuilder = com.google.publicalerts.cap.Group.newBuilder();
  1420. if (hasReferences()) {
  1421. subBuilder.mergeFrom(getReferences());
  1422. }
  1423. input.readMessage(subBuilder, extensionRegistry);
  1424. setReferences(subBuilder.buildPartial());
  1425. break;
  1426. }
  1427. case 122: {
  1428. com.google.publicalerts.cap.Group.Builder subBuilder = com.google.publicalerts.cap.Group.newBuilder();
  1429. if (hasIncidents()) {
  1430. subBuilder.mergeFrom(getIncidents());
  1431. }
  1432. input.readMessage(subBuilder, extensionRegistry);
  1433. setIncidents(subBuilder.buildPartial());
  1434. break;
  1435. }
  1436. case 130: {
  1437. com.google.publicalerts.cap.Info.Builder subBuilder = com.google.publicalerts.cap.Info.newBuilder();
  1438. input.readMessage(subBuilder, extensionRegistry);
  1439. addInfo(subBuilder.buildPartial());
  1440. break;
  1441. }
  1442. }
  1443. }
  1444. }
  1445. private int bitField0_;
  1446. // required string xmlns = 1;
  1447. private java.lang.Object xmlns_ = "";
  1448. public boolean hasXmlns() {
  1449. return ((bitField0_ & 0x00000001) == 0x00000001);
  1450. }
  1451. public String getXmlns() {
  1452. java.lang.Object ref = xmlns_;
  1453. if (!(ref instanceof String)) {
  1454. String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
  1455. xmlns_ = s;
  1456. return s;
  1457. } else {
  1458. return (String) ref;
  1459. }
  1460. }
  1461. public Builder setXmlns(String value) {
  1462. if (value == null) {
  1463. throw new NullPointerException();

Large files files are truncated, but you can click here to view the full file