PageRenderTime 40ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 1ms

/proto_src/org/waveprotocol/wave/diff/Diff.java

https://code.google.com/p/wave-protocol/
Java | 3078 lines | 2783 code | 224 blank | 71 comment | 341 complexity | 3078dce2185fd5050fdfe648f0a83f25 MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-3.0, CPL-1.0, Apache-2.0, MIT
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: org/waveprotocol/wave/diff/diff.proto
  3. package org.waveprotocol.wave.diff;
  4. public final class Diff {
  5. private Diff() {}
  6. public static void registerAllExtensions(
  7. com.google.protobuf.ExtensionRegistry registry) {
  8. }
  9. public static final class FetchDiffRequest extends
  10. com.google.protobuf.GeneratedMessage {
  11. // Use FetchDiffRequest.newBuilder() to construct.
  12. private FetchDiffRequest() {
  13. initFields();
  14. }
  15. private FetchDiffRequest(boolean noInit) {}
  16. private static final FetchDiffRequest defaultInstance;
  17. public static FetchDiffRequest getDefaultInstance() {
  18. return defaultInstance;
  19. }
  20. public FetchDiffRequest getDefaultInstanceForType() {
  21. return defaultInstance;
  22. }
  23. public static final com.google.protobuf.Descriptors.Descriptor
  24. getDescriptor() {
  25. return org.waveprotocol.wave.diff.Diff.internal_static_diff_FetchDiffRequest_descriptor;
  26. }
  27. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  28. internalGetFieldAccessorTable() {
  29. return org.waveprotocol.wave.diff.Diff.internal_static_diff_FetchDiffRequest_fieldAccessorTable;
  30. }
  31. // required string waveId = 1;
  32. public static final int WAVEID_FIELD_NUMBER = 1;
  33. private boolean hasWaveId;
  34. private java.lang.String waveId_ = "";
  35. public boolean hasWaveId() { return hasWaveId; }
  36. public java.lang.String getWaveId() { return waveId_; }
  37. // repeated .concurrencycontrol.WaveletVersion knownWavelet = 2;
  38. public static final int KNOWNWAVELET_FIELD_NUMBER = 2;
  39. private java.util.List<org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion> knownWavelet_ =
  40. java.util.Collections.emptyList();
  41. public java.util.List<org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion> getKnownWaveletList() {
  42. return knownWavelet_;
  43. }
  44. public int getKnownWaveletCount() { return knownWavelet_.size(); }
  45. public org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion getKnownWavelet(int index) {
  46. return knownWavelet_.get(index);
  47. }
  48. private void initFields() {
  49. }
  50. public final boolean isInitialized() {
  51. if (!hasWaveId) return false;
  52. for (org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion element : getKnownWaveletList()) {
  53. if (!element.isInitialized()) return false;
  54. }
  55. return true;
  56. }
  57. public void writeTo(com.google.protobuf.CodedOutputStream output)
  58. throws java.io.IOException {
  59. getSerializedSize();
  60. if (hasWaveId()) {
  61. output.writeString(1, getWaveId());
  62. }
  63. for (org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion element : getKnownWaveletList()) {
  64. output.writeMessage(2, element);
  65. }
  66. getUnknownFields().writeTo(output);
  67. }
  68. private int memoizedSerializedSize = -1;
  69. public int getSerializedSize() {
  70. int size = memoizedSerializedSize;
  71. if (size != -1) return size;
  72. size = 0;
  73. if (hasWaveId()) {
  74. size += com.google.protobuf.CodedOutputStream
  75. .computeStringSize(1, getWaveId());
  76. }
  77. for (org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion element : getKnownWaveletList()) {
  78. size += com.google.protobuf.CodedOutputStream
  79. .computeMessageSize(2, element);
  80. }
  81. size += getUnknownFields().getSerializedSize();
  82. memoizedSerializedSize = size;
  83. return size;
  84. }
  85. public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseFrom(
  86. com.google.protobuf.ByteString data)
  87. throws com.google.protobuf.InvalidProtocolBufferException {
  88. return newBuilder().mergeFrom(data).buildParsed();
  89. }
  90. public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseFrom(
  91. com.google.protobuf.ByteString data,
  92. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  93. throws com.google.protobuf.InvalidProtocolBufferException {
  94. return newBuilder().mergeFrom(data, extensionRegistry)
  95. .buildParsed();
  96. }
  97. public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseFrom(byte[] data)
  98. throws com.google.protobuf.InvalidProtocolBufferException {
  99. return newBuilder().mergeFrom(data).buildParsed();
  100. }
  101. public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseFrom(
  102. byte[] data,
  103. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  104. throws com.google.protobuf.InvalidProtocolBufferException {
  105. return newBuilder().mergeFrom(data, extensionRegistry)
  106. .buildParsed();
  107. }
  108. public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseFrom(java.io.InputStream input)
  109. throws java.io.IOException {
  110. return newBuilder().mergeFrom(input).buildParsed();
  111. }
  112. public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseFrom(
  113. java.io.InputStream input,
  114. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  115. throws java.io.IOException {
  116. return newBuilder().mergeFrom(input, extensionRegistry)
  117. .buildParsed();
  118. }
  119. public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseDelimitedFrom(java.io.InputStream input)
  120. throws java.io.IOException {
  121. Builder builder = newBuilder();
  122. if (builder.mergeDelimitedFrom(input)) {
  123. return builder.buildParsed();
  124. } else {
  125. return null;
  126. }
  127. }
  128. public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseDelimitedFrom(
  129. java.io.InputStream input,
  130. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  131. throws java.io.IOException {
  132. Builder builder = newBuilder();
  133. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  134. return builder.buildParsed();
  135. } else {
  136. return null;
  137. }
  138. }
  139. public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseFrom(
  140. com.google.protobuf.CodedInputStream input)
  141. throws java.io.IOException {
  142. return newBuilder().mergeFrom(input).buildParsed();
  143. }
  144. public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseFrom(
  145. com.google.protobuf.CodedInputStream input,
  146. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  147. throws java.io.IOException {
  148. return newBuilder().mergeFrom(input, extensionRegistry)
  149. .buildParsed();
  150. }
  151. public static Builder newBuilder() { return Builder.create(); }
  152. public Builder newBuilderForType() { return newBuilder(); }
  153. public static Builder newBuilder(org.waveprotocol.wave.diff.Diff.FetchDiffRequest prototype) {
  154. return newBuilder().mergeFrom(prototype);
  155. }
  156. public Builder toBuilder() { return newBuilder(this); }
  157. public static final class Builder extends
  158. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  159. private org.waveprotocol.wave.diff.Diff.FetchDiffRequest result;
  160. // Construct using org.waveprotocol.wave.diff.Diff.FetchDiffRequest.newBuilder()
  161. private Builder() {}
  162. private static Builder create() {
  163. Builder builder = new Builder();
  164. builder.result = new org.waveprotocol.wave.diff.Diff.FetchDiffRequest();
  165. return builder;
  166. }
  167. protected org.waveprotocol.wave.diff.Diff.FetchDiffRequest internalGetResult() {
  168. return result;
  169. }
  170. public Builder clear() {
  171. if (result == null) {
  172. throw new IllegalStateException(
  173. "Cannot call clear() after build().");
  174. }
  175. result = new org.waveprotocol.wave.diff.Diff.FetchDiffRequest();
  176. return this;
  177. }
  178. public Builder clone() {
  179. return create().mergeFrom(result);
  180. }
  181. public com.google.protobuf.Descriptors.Descriptor
  182. getDescriptorForType() {
  183. return org.waveprotocol.wave.diff.Diff.FetchDiffRequest.getDescriptor();
  184. }
  185. public org.waveprotocol.wave.diff.Diff.FetchDiffRequest getDefaultInstanceForType() {
  186. return org.waveprotocol.wave.diff.Diff.FetchDiffRequest.getDefaultInstance();
  187. }
  188. public boolean isInitialized() {
  189. return result.isInitialized();
  190. }
  191. public org.waveprotocol.wave.diff.Diff.FetchDiffRequest build() {
  192. if (result != null && !isInitialized()) {
  193. throw newUninitializedMessageException(result);
  194. }
  195. return buildPartial();
  196. }
  197. private org.waveprotocol.wave.diff.Diff.FetchDiffRequest buildParsed()
  198. throws com.google.protobuf.InvalidProtocolBufferException {
  199. if (!isInitialized()) {
  200. throw newUninitializedMessageException(
  201. result).asInvalidProtocolBufferException();
  202. }
  203. return buildPartial();
  204. }
  205. public org.waveprotocol.wave.diff.Diff.FetchDiffRequest buildPartial() {
  206. if (result == null) {
  207. throw new IllegalStateException(
  208. "build() has already been called on this Builder.");
  209. }
  210. if (result.knownWavelet_ != java.util.Collections.EMPTY_LIST) {
  211. result.knownWavelet_ =
  212. java.util.Collections.unmodifiableList(result.knownWavelet_);
  213. }
  214. org.waveprotocol.wave.diff.Diff.FetchDiffRequest returnMe = result;
  215. result = null;
  216. return returnMe;
  217. }
  218. public Builder mergeFrom(com.google.protobuf.Message other) {
  219. if (other instanceof org.waveprotocol.wave.diff.Diff.FetchDiffRequest) {
  220. return mergeFrom((org.waveprotocol.wave.diff.Diff.FetchDiffRequest)other);
  221. } else {
  222. super.mergeFrom(other);
  223. return this;
  224. }
  225. }
  226. public Builder mergeFrom(org.waveprotocol.wave.diff.Diff.FetchDiffRequest other) {
  227. if (other == org.waveprotocol.wave.diff.Diff.FetchDiffRequest.getDefaultInstance()) return this;
  228. if (other.hasWaveId()) {
  229. setWaveId(other.getWaveId());
  230. }
  231. if (!other.knownWavelet_.isEmpty()) {
  232. if (result.knownWavelet_.isEmpty()) {
  233. result.knownWavelet_ = new java.util.ArrayList<org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion>();
  234. }
  235. result.knownWavelet_.addAll(other.knownWavelet_);
  236. }
  237. this.mergeUnknownFields(other.getUnknownFields());
  238. return this;
  239. }
  240. public Builder mergeFrom(
  241. com.google.protobuf.CodedInputStream input,
  242. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  243. throws java.io.IOException {
  244. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  245. com.google.protobuf.UnknownFieldSet.newBuilder(
  246. this.getUnknownFields());
  247. while (true) {
  248. int tag = input.readTag();
  249. switch (tag) {
  250. case 0:
  251. this.setUnknownFields(unknownFields.build());
  252. return this;
  253. default: {
  254. if (!parseUnknownField(input, unknownFields,
  255. extensionRegistry, tag)) {
  256. this.setUnknownFields(unknownFields.build());
  257. return this;
  258. }
  259. break;
  260. }
  261. case 10: {
  262. setWaveId(input.readString());
  263. break;
  264. }
  265. case 18: {
  266. org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion.Builder subBuilder = org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion.newBuilder();
  267. input.readMessage(subBuilder, extensionRegistry);
  268. addKnownWavelet(subBuilder.buildPartial());
  269. break;
  270. }
  271. }
  272. }
  273. }
  274. // required string waveId = 1;
  275. public boolean hasWaveId() {
  276. return result.hasWaveId();
  277. }
  278. public java.lang.String getWaveId() {
  279. return result.getWaveId();
  280. }
  281. public Builder setWaveId(java.lang.String value) {
  282. if (value == null) {
  283. throw new NullPointerException();
  284. }
  285. result.hasWaveId = true;
  286. result.waveId_ = value;
  287. return this;
  288. }
  289. public Builder clearWaveId() {
  290. result.hasWaveId = false;
  291. result.waveId_ = getDefaultInstance().getWaveId();
  292. return this;
  293. }
  294. // repeated .concurrencycontrol.WaveletVersion knownWavelet = 2;
  295. public java.util.List<org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion> getKnownWaveletList() {
  296. return java.util.Collections.unmodifiableList(result.knownWavelet_);
  297. }
  298. public int getKnownWaveletCount() {
  299. return result.getKnownWaveletCount();
  300. }
  301. public org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion getKnownWavelet(int index) {
  302. return result.getKnownWavelet(index);
  303. }
  304. public Builder setKnownWavelet(int index, org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion value) {
  305. if (value == null) {
  306. throw new NullPointerException();
  307. }
  308. result.knownWavelet_.set(index, value);
  309. return this;
  310. }
  311. public Builder setKnownWavelet(int index, org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion.Builder builderForValue) {
  312. result.knownWavelet_.set(index, builderForValue.build());
  313. return this;
  314. }
  315. public Builder addKnownWavelet(org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion value) {
  316. if (value == null) {
  317. throw new NullPointerException();
  318. }
  319. if (result.knownWavelet_.isEmpty()) {
  320. result.knownWavelet_ = new java.util.ArrayList<org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion>();
  321. }
  322. result.knownWavelet_.add(value);
  323. return this;
  324. }
  325. public Builder addKnownWavelet(org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion.Builder builderForValue) {
  326. if (result.knownWavelet_.isEmpty()) {
  327. result.knownWavelet_ = new java.util.ArrayList<org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion>();
  328. }
  329. result.knownWavelet_.add(builderForValue.build());
  330. return this;
  331. }
  332. public Builder addAllKnownWavelet(
  333. java.lang.Iterable<? extends org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion> values) {
  334. if (result.knownWavelet_.isEmpty()) {
  335. result.knownWavelet_ = new java.util.ArrayList<org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion>();
  336. }
  337. super.addAll(values, result.knownWavelet_);
  338. return this;
  339. }
  340. public Builder clearKnownWavelet() {
  341. result.knownWavelet_ = java.util.Collections.emptyList();
  342. return this;
  343. }
  344. // @@protoc_insertion_point(builder_scope:diff.FetchDiffRequest)
  345. }
  346. static {
  347. defaultInstance = new FetchDiffRequest(true);
  348. org.waveprotocol.wave.diff.Diff.internalForceInit();
  349. defaultInstance.initFields();
  350. }
  351. // @@protoc_insertion_point(class_scope:diff.FetchDiffRequest)
  352. }
  353. public static final class FetchDiffResponse extends
  354. com.google.protobuf.GeneratedMessage {
  355. // Use FetchDiffResponse.newBuilder() to construct.
  356. private FetchDiffResponse() {
  357. initFields();
  358. }
  359. private FetchDiffResponse(boolean noInit) {}
  360. private static final FetchDiffResponse defaultInstance;
  361. public static FetchDiffResponse getDefaultInstance() {
  362. return defaultInstance;
  363. }
  364. public FetchDiffResponse getDefaultInstanceForType() {
  365. return defaultInstance;
  366. }
  367. public static final com.google.protobuf.Descriptors.Descriptor
  368. getDescriptor() {
  369. return org.waveprotocol.wave.diff.Diff.internal_static_diff_FetchDiffResponse_descriptor;
  370. }
  371. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  372. internalGetFieldAccessorTable() {
  373. return org.waveprotocol.wave.diff.Diff.internal_static_diff_FetchDiffResponse_fieldAccessorTable;
  374. }
  375. public static final class WaveletDiff extends
  376. com.google.protobuf.GeneratedMessage {
  377. // Use WaveletDiff.newBuilder() to construct.
  378. private WaveletDiff() {
  379. initFields();
  380. }
  381. private WaveletDiff(boolean noInit) {}
  382. private static final WaveletDiff defaultInstance;
  383. public static WaveletDiff getDefaultInstance() {
  384. return defaultInstance;
  385. }
  386. public WaveletDiff getDefaultInstanceForType() {
  387. return defaultInstance;
  388. }
  389. public static final com.google.protobuf.Descriptors.Descriptor
  390. getDescriptor() {
  391. return org.waveprotocol.wave.diff.Diff.internal_static_diff_FetchDiffResponse_WaveletDiff_descriptor;
  392. }
  393. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  394. internalGetFieldAccessorTable() {
  395. return org.waveprotocol.wave.diff.Diff.internal_static_diff_FetchDiffResponse_WaveletDiff_fieldAccessorTable;
  396. }
  397. // required string waveletId = 1;
  398. public static final int WAVELETID_FIELD_NUMBER = 1;
  399. private boolean hasWaveletId;
  400. private java.lang.String waveletId_ = "";
  401. public boolean hasWaveletId() { return hasWaveletId; }
  402. public java.lang.String getWaveletId() { return waveletId_; }
  403. // optional .diff.WaveletDiffSnapshot snapshot = 2;
  404. public static final int SNAPSHOT_FIELD_NUMBER = 2;
  405. private boolean hasSnapshot;
  406. private org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot snapshot_;
  407. public boolean hasSnapshot() { return hasSnapshot; }
  408. public org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot getSnapshot() { return snapshot_; }
  409. private void initFields() {
  410. snapshot_ = org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.getDefaultInstance();
  411. }
  412. public final boolean isInitialized() {
  413. if (!hasWaveletId) return false;
  414. if (hasSnapshot()) {
  415. if (!getSnapshot().isInitialized()) return false;
  416. }
  417. return true;
  418. }
  419. public void writeTo(com.google.protobuf.CodedOutputStream output)
  420. throws java.io.IOException {
  421. getSerializedSize();
  422. if (hasWaveletId()) {
  423. output.writeString(1, getWaveletId());
  424. }
  425. if (hasSnapshot()) {
  426. output.writeMessage(2, getSnapshot());
  427. }
  428. getUnknownFields().writeTo(output);
  429. }
  430. private int memoizedSerializedSize = -1;
  431. public int getSerializedSize() {
  432. int size = memoizedSerializedSize;
  433. if (size != -1) return size;
  434. size = 0;
  435. if (hasWaveletId()) {
  436. size += com.google.protobuf.CodedOutputStream
  437. .computeStringSize(1, getWaveletId());
  438. }
  439. if (hasSnapshot()) {
  440. size += com.google.protobuf.CodedOutputStream
  441. .computeMessageSize(2, getSnapshot());
  442. }
  443. size += getUnknownFields().getSerializedSize();
  444. memoizedSerializedSize = size;
  445. return size;
  446. }
  447. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseFrom(
  448. com.google.protobuf.ByteString data)
  449. throws com.google.protobuf.InvalidProtocolBufferException {
  450. return newBuilder().mergeFrom(data).buildParsed();
  451. }
  452. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseFrom(
  453. com.google.protobuf.ByteString data,
  454. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  455. throws com.google.protobuf.InvalidProtocolBufferException {
  456. return newBuilder().mergeFrom(data, extensionRegistry)
  457. .buildParsed();
  458. }
  459. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseFrom(byte[] data)
  460. throws com.google.protobuf.InvalidProtocolBufferException {
  461. return newBuilder().mergeFrom(data).buildParsed();
  462. }
  463. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseFrom(
  464. byte[] data,
  465. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  466. throws com.google.protobuf.InvalidProtocolBufferException {
  467. return newBuilder().mergeFrom(data, extensionRegistry)
  468. .buildParsed();
  469. }
  470. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseFrom(java.io.InputStream input)
  471. throws java.io.IOException {
  472. return newBuilder().mergeFrom(input).buildParsed();
  473. }
  474. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseFrom(
  475. java.io.InputStream input,
  476. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  477. throws java.io.IOException {
  478. return newBuilder().mergeFrom(input, extensionRegistry)
  479. .buildParsed();
  480. }
  481. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseDelimitedFrom(java.io.InputStream input)
  482. throws java.io.IOException {
  483. Builder builder = newBuilder();
  484. if (builder.mergeDelimitedFrom(input)) {
  485. return builder.buildParsed();
  486. } else {
  487. return null;
  488. }
  489. }
  490. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseDelimitedFrom(
  491. java.io.InputStream input,
  492. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  493. throws java.io.IOException {
  494. Builder builder = newBuilder();
  495. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  496. return builder.buildParsed();
  497. } else {
  498. return null;
  499. }
  500. }
  501. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseFrom(
  502. com.google.protobuf.CodedInputStream input)
  503. throws java.io.IOException {
  504. return newBuilder().mergeFrom(input).buildParsed();
  505. }
  506. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseFrom(
  507. com.google.protobuf.CodedInputStream input,
  508. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  509. throws java.io.IOException {
  510. return newBuilder().mergeFrom(input, extensionRegistry)
  511. .buildParsed();
  512. }
  513. public static Builder newBuilder() { return Builder.create(); }
  514. public Builder newBuilderForType() { return newBuilder(); }
  515. public static Builder newBuilder(org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff prototype) {
  516. return newBuilder().mergeFrom(prototype);
  517. }
  518. public Builder toBuilder() { return newBuilder(this); }
  519. public static final class Builder extends
  520. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  521. private org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff result;
  522. // Construct using org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.newBuilder()
  523. private Builder() {}
  524. private static Builder create() {
  525. Builder builder = new Builder();
  526. builder.result = new org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff();
  527. return builder;
  528. }
  529. protected org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff internalGetResult() {
  530. return result;
  531. }
  532. public Builder clear() {
  533. if (result == null) {
  534. throw new IllegalStateException(
  535. "Cannot call clear() after build().");
  536. }
  537. result = new org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff();
  538. return this;
  539. }
  540. public Builder clone() {
  541. return create().mergeFrom(result);
  542. }
  543. public com.google.protobuf.Descriptors.Descriptor
  544. getDescriptorForType() {
  545. return org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.getDescriptor();
  546. }
  547. public org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff getDefaultInstanceForType() {
  548. return org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.getDefaultInstance();
  549. }
  550. public boolean isInitialized() {
  551. return result.isInitialized();
  552. }
  553. public org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff build() {
  554. if (result != null && !isInitialized()) {
  555. throw newUninitializedMessageException(result);
  556. }
  557. return buildPartial();
  558. }
  559. private org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff buildParsed()
  560. throws com.google.protobuf.InvalidProtocolBufferException {
  561. if (!isInitialized()) {
  562. throw newUninitializedMessageException(
  563. result).asInvalidProtocolBufferException();
  564. }
  565. return buildPartial();
  566. }
  567. public org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff buildPartial() {
  568. if (result == null) {
  569. throw new IllegalStateException(
  570. "build() has already been called on this Builder.");
  571. }
  572. org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff returnMe = result;
  573. result = null;
  574. return returnMe;
  575. }
  576. public Builder mergeFrom(com.google.protobuf.Message other) {
  577. if (other instanceof org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff) {
  578. return mergeFrom((org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff)other);
  579. } else {
  580. super.mergeFrom(other);
  581. return this;
  582. }
  583. }
  584. public Builder mergeFrom(org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff other) {
  585. if (other == org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.getDefaultInstance()) return this;
  586. if (other.hasWaveletId()) {
  587. setWaveletId(other.getWaveletId());
  588. }
  589. if (other.hasSnapshot()) {
  590. mergeSnapshot(other.getSnapshot());
  591. }
  592. this.mergeUnknownFields(other.getUnknownFields());
  593. return this;
  594. }
  595. public Builder mergeFrom(
  596. com.google.protobuf.CodedInputStream input,
  597. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  598. throws java.io.IOException {
  599. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  600. com.google.protobuf.UnknownFieldSet.newBuilder(
  601. this.getUnknownFields());
  602. while (true) {
  603. int tag = input.readTag();
  604. switch (tag) {
  605. case 0:
  606. this.setUnknownFields(unknownFields.build());
  607. return this;
  608. default: {
  609. if (!parseUnknownField(input, unknownFields,
  610. extensionRegistry, tag)) {
  611. this.setUnknownFields(unknownFields.build());
  612. return this;
  613. }
  614. break;
  615. }
  616. case 10: {
  617. setWaveletId(input.readString());
  618. break;
  619. }
  620. case 18: {
  621. org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.Builder subBuilder = org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.newBuilder();
  622. if (hasSnapshot()) {
  623. subBuilder.mergeFrom(getSnapshot());
  624. }
  625. input.readMessage(subBuilder, extensionRegistry);
  626. setSnapshot(subBuilder.buildPartial());
  627. break;
  628. }
  629. }
  630. }
  631. }
  632. // required string waveletId = 1;
  633. public boolean hasWaveletId() {
  634. return result.hasWaveletId();
  635. }
  636. public java.lang.String getWaveletId() {
  637. return result.getWaveletId();
  638. }
  639. public Builder setWaveletId(java.lang.String value) {
  640. if (value == null) {
  641. throw new NullPointerException();
  642. }
  643. result.hasWaveletId = true;
  644. result.waveletId_ = value;
  645. return this;
  646. }
  647. public Builder clearWaveletId() {
  648. result.hasWaveletId = false;
  649. result.waveletId_ = getDefaultInstance().getWaveletId();
  650. return this;
  651. }
  652. // optional .diff.WaveletDiffSnapshot snapshot = 2;
  653. public boolean hasSnapshot() {
  654. return result.hasSnapshot();
  655. }
  656. public org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot getSnapshot() {
  657. return result.getSnapshot();
  658. }
  659. public Builder setSnapshot(org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot value) {
  660. if (value == null) {
  661. throw new NullPointerException();
  662. }
  663. result.hasSnapshot = true;
  664. result.snapshot_ = value;
  665. return this;
  666. }
  667. public Builder setSnapshot(org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.Builder builderForValue) {
  668. result.hasSnapshot = true;
  669. result.snapshot_ = builderForValue.build();
  670. return this;
  671. }
  672. public Builder mergeSnapshot(org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot value) {
  673. if (result.hasSnapshot() &&
  674. result.snapshot_ != org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.getDefaultInstance()) {
  675. result.snapshot_ =
  676. org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.newBuilder(result.snapshot_).mergeFrom(value).buildPartial();
  677. } else {
  678. result.snapshot_ = value;
  679. }
  680. result.hasSnapshot = true;
  681. return this;
  682. }
  683. public Builder clearSnapshot() {
  684. result.hasSnapshot = false;
  685. result.snapshot_ = org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.getDefaultInstance();
  686. return this;
  687. }
  688. // @@protoc_insertion_point(builder_scope:diff.FetchDiffResponse.WaveletDiff)
  689. }
  690. static {
  691. defaultInstance = new WaveletDiff(true);
  692. org.waveprotocol.wave.diff.Diff.internalForceInit();
  693. defaultInstance.initFields();
  694. }
  695. // @@protoc_insertion_point(class_scope:diff.FetchDiffResponse.WaveletDiff)
  696. }
  697. // required .concurrencycontrol.ResponseStatus status = 1;
  698. public static final int STATUS_FIELD_NUMBER = 1;
  699. private boolean hasStatus;
  700. private org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus status_;
  701. public boolean hasStatus() { return hasStatus; }
  702. public org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus getStatus() { return status_; }
  703. // repeated .diff.FetchDiffResponse.WaveletDiff wavelet = 2;
  704. public static final int WAVELET_FIELD_NUMBER = 2;
  705. private java.util.List<org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff> wavelet_ =
  706. java.util.Collections.emptyList();
  707. public java.util.List<org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff> getWaveletList() {
  708. return wavelet_;
  709. }
  710. public int getWaveletCount() { return wavelet_.size(); }
  711. public org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff getWavelet(int index) {
  712. return wavelet_.get(index);
  713. }
  714. private void initFields() {
  715. status_ = org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus.getDefaultInstance();
  716. }
  717. public final boolean isInitialized() {
  718. if (!hasStatus) return false;
  719. if (!getStatus().isInitialized()) return false;
  720. for (org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff element : getWaveletList()) {
  721. if (!element.isInitialized()) return false;
  722. }
  723. return true;
  724. }
  725. public void writeTo(com.google.protobuf.CodedOutputStream output)
  726. throws java.io.IOException {
  727. getSerializedSize();
  728. if (hasStatus()) {
  729. output.writeMessage(1, getStatus());
  730. }
  731. for (org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff element : getWaveletList()) {
  732. output.writeMessage(2, element);
  733. }
  734. getUnknownFields().writeTo(output);
  735. }
  736. private int memoizedSerializedSize = -1;
  737. public int getSerializedSize() {
  738. int size = memoizedSerializedSize;
  739. if (size != -1) return size;
  740. size = 0;
  741. if (hasStatus()) {
  742. size += com.google.protobuf.CodedOutputStream
  743. .computeMessageSize(1, getStatus());
  744. }
  745. for (org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff element : getWaveletList()) {
  746. size += com.google.protobuf.CodedOutputStream
  747. .computeMessageSize(2, element);
  748. }
  749. size += getUnknownFields().getSerializedSize();
  750. memoizedSerializedSize = size;
  751. return size;
  752. }
  753. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseFrom(
  754. com.google.protobuf.ByteString data)
  755. throws com.google.protobuf.InvalidProtocolBufferException {
  756. return newBuilder().mergeFrom(data).buildParsed();
  757. }
  758. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseFrom(
  759. com.google.protobuf.ByteString data,
  760. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  761. throws com.google.protobuf.InvalidProtocolBufferException {
  762. return newBuilder().mergeFrom(data, extensionRegistry)
  763. .buildParsed();
  764. }
  765. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseFrom(byte[] data)
  766. throws com.google.protobuf.InvalidProtocolBufferException {
  767. return newBuilder().mergeFrom(data).buildParsed();
  768. }
  769. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseFrom(
  770. byte[] data,
  771. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  772. throws com.google.protobuf.InvalidProtocolBufferException {
  773. return newBuilder().mergeFrom(data, extensionRegistry)
  774. .buildParsed();
  775. }
  776. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseFrom(java.io.InputStream input)
  777. throws java.io.IOException {
  778. return newBuilder().mergeFrom(input).buildParsed();
  779. }
  780. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseFrom(
  781. java.io.InputStream input,
  782. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  783. throws java.io.IOException {
  784. return newBuilder().mergeFrom(input, extensionRegistry)
  785. .buildParsed();
  786. }
  787. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseDelimitedFrom(java.io.InputStream input)
  788. throws java.io.IOException {
  789. Builder builder = newBuilder();
  790. if (builder.mergeDelimitedFrom(input)) {
  791. return builder.buildParsed();
  792. } else {
  793. return null;
  794. }
  795. }
  796. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseDelimitedFrom(
  797. java.io.InputStream input,
  798. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  799. throws java.io.IOException {
  800. Builder builder = newBuilder();
  801. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  802. return builder.buildParsed();
  803. } else {
  804. return null;
  805. }
  806. }
  807. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseFrom(
  808. com.google.protobuf.CodedInputStream input)
  809. throws java.io.IOException {
  810. return newBuilder().mergeFrom(input).buildParsed();
  811. }
  812. public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseFrom(
  813. com.google.protobuf.CodedInputStream input,
  814. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  815. throws java.io.IOException {
  816. return newBuilder().mergeFrom(input, extensionRegistry)
  817. .buildParsed();
  818. }
  819. public static Builder newBuilder() { return Builder.create(); }
  820. public Builder newBuilderForType() { return newBuilder(); }
  821. public static Builder newBuilder(org.waveprotocol.wave.diff.Diff.FetchDiffResponse prototype) {
  822. return newBuilder().mergeFrom(prototype);
  823. }
  824. public Builder toBuilder() { return newBuilder(this); }
  825. public static final class Builder extends
  826. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  827. private org.waveprotocol.wave.diff.Diff.FetchDiffResponse result;
  828. // Construct using org.waveprotocol.wave.diff.Diff.FetchDiffResponse.newBuilder()
  829. private Builder() {}
  830. private static Builder create() {
  831. Builder builder = new Builder();
  832. builder.result = new org.waveprotocol.wave.diff.Diff.FetchDiffResponse();
  833. return builder;
  834. }
  835. protected org.waveprotocol.wave.diff.Diff.FetchDiffResponse internalGetResult() {
  836. return result;
  837. }
  838. public Builder clear() {
  839. if (result == null) {
  840. throw new IllegalStateException(
  841. "Cannot call clear() after build().");
  842. }
  843. result = new org.waveprotocol.wave.diff.Diff.FetchDiffResponse();
  844. return this;
  845. }
  846. public Builder clone() {
  847. return create().mergeFrom(result);
  848. }
  849. public com.google.protobuf.Descriptors.Descriptor
  850. getDescriptorForType() {
  851. return org.waveprotocol.wave.diff.Diff.FetchDiffResponse.getDescriptor();
  852. }
  853. public org.waveprotocol.wave.diff.Diff.FetchDiffResponse getDefaultInstanceForType() {
  854. return org.waveprotocol.wave.diff.Diff.FetchDiffResponse.getDefaultInstance();
  855. }
  856. public boolean isInitialized() {
  857. return result.isInitialized();
  858. }
  859. public org.waveprotocol.wave.diff.Diff.FetchDiffResponse build() {
  860. if (result != null && !isInitialized()) {
  861. throw newUninitializedMessageException(result);
  862. }
  863. return buildPartial();
  864. }
  865. private org.waveprotocol.wave.diff.Diff.FetchDiffResponse buildParsed()
  866. throws com.google.protobuf.InvalidProtocolBufferException {
  867. if (!isInitialized()) {
  868. throw newUninitializedMessageException(
  869. result).asInvalidProtocolBufferException();
  870. }
  871. return buildPartial();
  872. }
  873. public org.waveprotocol.wave.diff.Diff.FetchDiffResponse buildPartial() {
  874. if (result == null) {
  875. throw new IllegalStateException(
  876. "build() has already been called on this Builder.");
  877. }
  878. if (result.wavelet_ != java.util.Collections.EMPTY_LIST) {
  879. result.wavelet_ =
  880. java.util.Collections.unmodifiableList(result.wavelet_);
  881. }
  882. org.waveprotocol.wave.diff.Diff.FetchDiffResponse returnMe = result;
  883. result = null;
  884. return returnMe;
  885. }
  886. public Builder mergeFrom(com.google.protobuf.Message other) {
  887. if (other instanceof org.waveprotocol.wave.diff.Diff.FetchDiffResponse) {
  888. return mergeFrom((org.waveprotocol.wave.diff.Diff.FetchDiffResponse)other);
  889. } else {
  890. super.mergeFrom(other);
  891. return this;
  892. }
  893. }
  894. public Builder mergeFrom(org.waveprotocol.wave.diff.Diff.FetchDiffResponse other) {
  895. if (other == org.waveprotocol.wave.diff.Diff.FetchDiffResponse.getDefaultInstance()) return this;
  896. if (other.hasStatus()) {
  897. mergeStatus(other.getStatus());
  898. }
  899. if (!other.wavelet_.isEmpty()) {
  900. if (result.wavelet_.isEmpty()) {
  901. result.wavelet_ = new java.util.ArrayList<org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff>();
  902. }
  903. result.wavelet_.addAll(other.wavelet_);
  904. }
  905. this.mergeUnknownFields(other.getUnknownFields());
  906. return this;
  907. }
  908. public Builder mergeFrom(
  909. com.google.protobuf.CodedInputStream input,
  910. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  911. throws java.io.IOException {
  912. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  913. com.google.protobuf.UnknownFieldSet.newBuilder(
  914. this.getUnknownFields());
  915. while (true) {
  916. int tag = input.readTag();
  917. switch (tag) {
  918. case 0:
  919. this.setUnknownFields(unknownFields.build());
  920. return this;
  921. default: {
  922. if (!parseUnknownField(input, unknownFields,
  923. extensionRegistry, tag)) {
  924. this.setUnknownFields(unknownFields.build());
  925. return this;
  926. }
  927. break;
  928. }
  929. case 10: {
  930. org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus.Builder subBuilder = org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus.newBuilder();
  931. if (hasStatus()) {
  932. subBuilder.mergeFrom(getStatus());
  933. }
  934. input.readMessage(subBuilder, extensionRegistry);
  935. setStatus(subBuilder.buildPartial());
  936. break;
  937. }
  938. case 18: {
  939. org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.Builder subBuilder = org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.newBuilder();
  940. input.readMessage(subBuilder, extensionRegistry);
  941. addWavelet(subBuilder.buildPartial());
  942. break;
  943. }
  944. }
  945. }
  946. }
  947. // required .concurrencycontrol.ResponseStatus status = 1;
  948. public boolean hasStatus() {
  949. return result.hasStatus();
  950. }
  951. public org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus getStatus() {
  952. return result.getStatus();
  953. }
  954. public Builder setStatus(org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus value) {
  955. if (value == null) {
  956. throw new NullPointerException();
  957. }
  958. result.hasStatus = true;
  959. result.status_ = value;
  960. return this;
  961. }
  962. public Builder setStatus(org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus.Builder builderForValue) {
  963. result.hasStatus = true;
  964. result.status_ = builderForValue.build();
  965. return this;
  966. }
  967. public Builder mergeStatus(org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus value) {
  968. if (result.hasStatus() &&
  969. result.status_ != org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus.getDefaultInstance()) {
  970. result.status_ =
  971. org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus.newBuilder(result.status_).mergeFrom(value).buildPartial();
  972. } else {
  973. result.status_ = value;
  974. }
  975. result.hasStatus = true;
  976. return this;
  977. }
  978. public Builder clearStatus() {
  979. result.hasStatus = false;
  980. result.status_ = org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus.getDefaultInstance();
  981. return this;
  982. }
  983. // repeated .diff.FetchDiffResponse.WaveletDiff wavelet = 2;
  984. public java.util.List<org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff> getWaveletList() {
  985. return java.util.Collections.unmodifiableList(result.wavelet_);
  986. }
  987. public int getWaveletCount() {
  988. return result.getWaveletCount();
  989. }
  990. public org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff getWavelet(int index) {
  991. return result.getWavelet(index);
  992. }
  993. public Builder setWavelet(int index, org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff value) {
  994. if (value == null) {
  995. throw new NullPointerException();
  996. }
  997. result.wavelet_.set(index, value);
  998. return this;
  999. }
  1000. public Builder setWavelet(int index, org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.Builder builderForValue) {
  1001. result.wavelet_.set(index, builderForValue.build());
  1002. return this;
  1003. }
  1004. public Builder addWavelet(org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff value) {
  1005. if (value == null) {
  1006. throw new NullPointerException();
  1007. }
  1008. if (result.wavelet_.isEmpty()) {
  1009. result.wavelet_ = new java.util.ArrayList<org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff>();
  1010. }
  1011. result.wavelet_.add(value);
  1012. return this;
  1013. }
  1014. public Builder addWavelet(org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.Builder builderForValue) {
  1015. if (result.wavelet_.isEmpty()) {
  1016. result.wavelet_ = new java.util.ArrayList<org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff>();
  1017. }
  1018. result.wavelet_.add(builderForValue.build());
  1019. return this;
  1020. }
  1021. public Builder addAllWavelet(
  1022. java.lang.Iterable<? extends org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff> values) {
  1023. if (result.wavelet_.isEmpty()) {
  1024. result.wavelet_ = new java.util.ArrayList<org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff>();
  1025. }
  1026. super.addAll(values, result.wavelet_);
  1027. return this;
  1028. }
  1029. public Builder clearWavelet() {
  1030. result.wavelet_ = java.util.Collections.emptyList();
  1031. return this;
  1032. }
  1033. // @@protoc_insertion_point(builder_scope:diff.FetchDiffResponse)
  1034. }
  1035. static {
  1036. defaultInstance = new FetchDiffResponse(true);
  1037. org.waveprotocol.wave.diff.Diff.internalForceInit();
  1038. defaultInstance.initFields();
  1039. }
  1040. // @@protoc_insertion_point(class_scope:diff.FetchDiffResponse)
  1041. }
  1042. public static final class WaveletDiffSnapshot extends
  1043. com.google.protobuf.GeneratedMessage {
  1044. // Use WaveletDiffSnapshot.newBuilder() to construct.
  1045. private WaveletDiffSnapshot() {
  1046. initFields();
  1047. }
  1048. private WaveletDiffSnapshot(boolean noInit) {}
  1049. private static final WaveletDiffSnapshot defaultInstance;
  1050. public static WaveletDiffSnapshot getDefaultInstance() {
  1051. return defaultInstance;
  1052. }
  1053. public WaveletDiffSnapshot getDefaultInstanceForType() {
  1054. return defaultInstance;
  1055. }
  1056. public static final com.google.protobuf.Descriptors.Descriptor
  1057. getDescriptor() {
  1058. return org.waveprotocol.wave.diff.Diff.internal_static_diff_WaveletDiffSnapshot_descriptor;
  1059. }
  1060. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1061. internalGetFieldAccessorTable() {
  1062. return org.waveprotocol.wave.diff.Diff.internal_static_diff_WaveletDiffSnapshot_fieldAccessorTable;
  1063. }
  1064. // required string waveletId = 1;
  1065. public static final int WAVELETID_FIELD_NUMBER = 1;
  1066. private boolean hasWaveletId;
  1067. private java.lang.String waveletId_ = "";
  1068. public boolean hasWaveletId() { return hasWaveletId; }
  1069. public java.lang.String getWaveletId() { return waveletId_; }
  1070. // repeated string participant = 2;
  1071. public static final int PARTICIPANT_FIELD_NUMBER = 2;
  1072. private java.util.List<java.lang.String> participant_ =
  1073. java.util.Collections.emptyList();
  1074. public java.util.List<java.lang.String> getParticipantList() {
  1075. return participant_;
  1076. }
  1077. public int getParticipantCount() { return participant_.size(); }
  1078. public java.lang.String getParticipant(int index) {
  1079. return participant_.get(index);
  1080. }
  1081. // repeated string addedParticipant = 21;
  1082. public static final int ADDEDPARTICIPANT_FIELD_NUMBER = 21;
  1083. private java.util.List<java.lang.String> addedParticipant_ =
  1084. java.util.Collections.emptyList();
  1085. public java.util.List<java.lang.String> getAddedParticipantList() {
  1086. return addedParticipant_;
  1087. }
  1088. public int getAddedParticipantCount() { return addedParticipant_.size(); }
  1089. public java.lang.String getAddedParticipant(int index) {
  1090. return addedParticipant_.get(index);
  1091. }
  1092. // repeated string removedParticipant = 22;
  1093. public static final int REMOVEDPARTICIPANT_FIELD_NUMBER = 22;
  1094. private java.util.List<java.lang.String> removedParticipant_ =
  1095. java.util.Collections.emptyList();
  1096. public java.util.List<java.lang.String> getRemovedParticipantList() {
  1097. return removedParticipant_;
  1098. }
  1099. public int getRemovedParticipantCount() { return removedParticipant_.size(); }
  1100. public java.lang.String getRemovedParticipant(int index) {
  1101. return removedParticipant_.get(index);
  1102. }
  1103. // repeated .diff.DocumentDiffSnapshot document = 3;
  1104. public static final int DOCUMENT_FIELD_NUMBER = 3;
  1105. private java.util.List<org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot> document_ =
  1106. java.util.Collections.emptyList();
  1107. public java.util.List<org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot> getDocumentList() {
  1108. return document_;
  1109. }
  1110. public int getDocumentCount() { return document_.size(); }
  1111. public org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot getDocument(int index) {
  1112. return document_.get(index);
  1113. }
  1114. // required .federation.ProtocolHashedVersion version = 4;
  1115. public static final int VERSION_FIELD_NUMBER = 4;
  1116. private boolean hasVersion;
  1117. private org.waveprotocol.wave.federation.Proto.ProtocolHashedVersion version_;
  1118. public boolean hasVersion() { return hasVersion; }
  1119. public org.waveprotocol.wave.federation.Proto.ProtocolHashedVersion getVersion() { return version_; }
  1120. // required int64 lastModifiedTime = 5;
  1121. public static final int LASTMODIFIEDTIME_FIELD_NUMBER = 5;
  1122. private boolean hasLastModifiedTime;
  1123. private long lastModifiedTime_ = 0L;
  1124. public boolean hasLastModifiedTime() { return hasLastModifiedTime; }
  1125. public long getLastModifiedTime() { return lastModifiedTime_; }
  1126. // required string creator = 6;
  1127. public static final int CREATOR_FIELD_NUMBER = 6;
  1128. private boolean hasCreator;
  1129. private java.lang.String creator_ = "";
  1130. public boolean hasCreator() { return hasCreator; }
  1131. public java.lang.String getCreator() { return creator_; }
  1132. // required int64 creationTime = 7;
  1133. public static final int CREATIONTIME_FIELD_NUMBER = 7;
  1134. private boolean hasCreationTime;
  1135. private long creationTime_ = 0L;
  1136. public boolean hasCreationTime() { return hasCreationTime; }
  1137. public long getCreationTime() { return creationTime_; }
  1138. private void initFields() {
  1139. version_ = org.waveprotocol.wave.federation.Proto.ProtocolHashedVersion.getDefaultInstance();
  1140. }
  1141. public final boolean isInitialized() {
  1142. if (!hasWaveletId) return false;
  1143. if (!hasVersion) return false;
  1144. if (!hasLastModifiedTime) return false;
  1145. if (!hasCreator) return false;
  1146. if (!hasCreationTime) return false;
  1147. for (org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot element : getDocumentList()) {
  1148. if (!element.isInitialized()) return false;
  1149. }
  1150. if (!getVersion().isInitialized()) return false;
  1151. return true;
  1152. }
  1153. public void writeTo(com.google.protobuf.CodedOutputStream output)
  1154. throws java.io.IOException {
  1155. getSerializedSize();
  1156. if (hasWaveletId()) {
  1157. output.writeString(1, getWaveletId());
  1158. }
  1159. for (java.lang.String element : getParticipantList()) {
  1160. output.writeString(2, element);
  1161. }
  1162. for (org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot element : getDocumentList()) {
  1163. output.writeMessage(3, element);
  1164. }
  1165. if (hasVersion()) {
  1166. output.writeMessage(4, getVersion());
  1167. }
  1168. if (hasLastModifiedTime()) {
  1169. output.writeInt64(5, getLastModifiedTime());
  1170. }
  1171. if (hasCreator()) {
  1172. output.writeString(6, getCreator());
  1173. }
  1174. if (hasCreationTime()) {
  1175. output.writeInt64(7, getCreationTime());
  1176. }
  1177. for (java.lang.String element : getAddedParticipantList()) {
  1178. output.writeString(21, element);
  1179. }
  1180. for (java.lang.String element : getRemovedParticipantList()) {
  1181. output.writeString(22, element);
  1182. }
  1183. getUnknownFields().writeTo(output);
  1184. }
  1185. private int memoizedSerializedSize = -1;
  1186. public int getSerializedSize() {
  1187. int size = memoizedSerializedSize;
  1188. if (size != -1) return size;
  1189. size = 0;
  1190. if (hasWaveletId()) {
  1191. size += com.google.protobuf.CodedOutputStream
  1192. .computeStringSize(1, getWaveletId());
  1193. }
  1194. {
  1195. int dataSize = 0;
  1196. for (java.lang.String element : getParticipantList()) {
  1197. dataSize += com.google.protobuf.CodedOutputStream
  1198. .computeStringSizeNoTag(element);
  1199. }
  1200. size += dataSize;
  1201. size += 1 * getParticipantList().size();
  1202. }
  1203. for (org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot element : getDocumentList()) {
  1204. size += com.google.protobuf.CodedOutputStream
  1205. .computeMessageSize(3, element);
  1206. }
  1207. if (hasVersion()) {
  1208. size += com.google.protobuf.CodedOutputStream
  1209. .computeMessageSize(4, getVersion());
  1210. }
  1211. if (hasLastModifiedTime()) {
  1212. size += com.google.protobuf.CodedOutputStream
  1213. .computeInt64Size(5, getLastModifiedTime());
  1214. }
  1215. if (hasCreator()) {
  1216. size += com.google.protobuf.CodedOutputStream
  1217. .computeStringSize(6, getCreator());
  1218. }
  1219. if (hasCreationTime()) {
  1220. size += com.google.protobuf.CodedOutputStream
  1221. .computeInt64Size(7, getCreationTime());
  1222. }
  1223. {
  1224. int dataSize = 0;
  1225. for (java.lang.String element : getAddedParticipantList()) {
  1226. dataSize += com.google.protobuf.CodedOutputStream
  1227. .computeStringSizeNoTag(element);
  1228. }
  1229. size += dataSize;
  1230. size += 2 * getAddedParticipantList().size();
  1231. }
  1232. {
  1233. int dataSize = 0;
  1234. for (java.lang.String element : getRemovedParticipantList()) {
  1235. dataSize += com.google.protobuf.CodedOutputStream
  1236. .computeStringSizeNoTag(element);
  1237. }
  1238. size += dataSize;
  1239. size += 2 * getRemovedParticipantList().size();
  1240. }
  1241. size += getUnknownFields().getSerializedSize();
  1242. memoizedSerializedSize = size;
  1243. return size;
  1244. }
  1245. public static org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot parseFrom(
  1246. com.google.protobuf.ByteString data)
  1247. throws com.google.protobuf.InvalidProtocolBufferException {
  1248. return newBuilder().mergeFrom(data).buildParsed();
  1249. }
  1250. public static org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot parseFrom(
  1251. com.google.protobuf.ByteString data,
  1252. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1253. throws com.google.protobuf.InvalidProtocolBufferException {
  1254. return newBuilder().mergeFrom(data, extensionRegistry)
  1255. .buildParsed();
  1256. }
  1257. public static org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot parseFrom(byte[] data)
  1258. throws com.google.protobuf.InvalidProtocolBufferException {
  1259. return newBuilder().mergeFrom(data).buildParsed();
  1260. }
  1261. public static org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot parseFrom(
  1262. byte[] data,
  1263. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1264. throws com.google.protobuf.InvalidProtocolBufferException {
  1265. return newBuilder().mergeFrom(data, extensionRegistry)
  1266. .buildParsed();
  1267. }
  1268. public static org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot parseFrom(java.io.InputStream input)
  1269. throws java.io.IOException {
  1270. return newBuilder().mergeFrom(input).buildParsed();
  1271. }
  1272. public static org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot parseFrom(
  1273. java.io.InputStream input,
  1274. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1275. throws java.io.IOException {
  1276. return newBuilder().mergeFrom(input, extensionRegistry)
  1277. .buildParsed();
  1278. }
  1279. public static org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot parseDelimitedFrom(java.io.InputStream input)
  1280. throws java.io.IOException {
  1281. Builder builder = newBuilder();
  1282. if (builder.mergeDelimitedFrom(input)) {
  1283. return builder.buildParsed();
  1284. } else {
  1285. return null;
  1286. }
  1287. }
  1288. public static org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot parseDelimitedFrom(
  1289. java.io.InputStream input,
  1290. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1291. throws java.io.IOException {
  1292. Builder builder = newBuilder();
  1293. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  1294. return builder.buildParsed();
  1295. } else {
  1296. return null;
  1297. }
  1298. }
  1299. public static org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot parseFrom(
  1300. com.google.protobuf.CodedInputStream input)
  1301. throws java.io.IOException {
  1302. return newBuilder().mergeFrom(input).buildParsed();
  1303. }
  1304. public static org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot parseFrom(
  1305. com.google.protobuf.CodedInputStream input,
  1306. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1307. throws java.io.IOException {
  1308. return newBuilder().mergeFrom(input, extensionRegistry)
  1309. .buildParsed();
  1310. }
  1311. public static Builder newBuilder() { return Builder.create(); }
  1312. public Builder newBuilderForType() { return newBuilder(); }
  1313. public static Builder newBuilder(org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot prototype) {
  1314. return newBuilder().mergeFrom(prototype);
  1315. }
  1316. public Builder toBuilder() { return newBuilder(this); }
  1317. public static final class Builder extends
  1318. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  1319. private org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot result;
  1320. // Construct using org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.newBuilder()
  1321. private Builder() {}
  1322. private static Builder create() {
  1323. Builder builder = new Builder();
  1324. builder.result = new org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot();
  1325. return builder;
  1326. }
  1327. protected org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot internalGetResult() {
  1328. return result;
  1329. }
  1330. public Builder clear() {
  1331. if (result == null) {
  1332. throw new IllegalStateException(
  1333. "Cannot call clear() after build().");
  1334. }
  1335. result = new org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot();
  1336. return this;
  1337. }
  1338. public Builder clone() {
  1339. return create().mergeFrom(result);
  1340. }
  1341. public com.google.protobuf.Descriptors.Descriptor
  1342. getDescriptorForType() {
  1343. return org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.getDescriptor();
  1344. }
  1345. public org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot getDefaultInstanceForType() {
  1346. return org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.getDefaultInstance();
  1347. }
  1348. public boolean isInitialized() {
  1349. return result.isInitialized();
  1350. }
  1351. public org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot build() {
  1352. if (result != null && !isInitialized()) {
  1353. throw newUninitializedMessageException(result);
  1354. }
  1355. return buildPartial();
  1356. }
  1357. private org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot buildParsed()
  1358. throws com.google.protobuf.InvalidProtocolBufferException {
  1359. if (!isInitialized()) {
  1360. throw newUninitializedMessageException(
  1361. result).asInvalidProtocolBufferException();
  1362. }
  1363. return buildPartial();
  1364. }
  1365. public org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot buildPartial() {
  1366. if (result == null) {
  1367. throw new IllegalStateException(
  1368. "build() has already been called on this Builder.");
  1369. }
  1370. if (result.participant_ != java.util.Collections.EMPTY_LIST) {
  1371. result.participant_ =
  1372. java.util.Collections.unmodifiableList(result.participant_);
  1373. }
  1374. if (result.addedParticipant_ != java.util.Collections.EMPTY_LIST) {
  1375. result.addedParticipant_ =
  1376. java.util.Collections.unmodifiableList(result.addedParticipant_);
  1377. }
  1378. if (result.removedParticipant_ != java.util.Collections.EMPTY_LIST) {
  1379. result.removedParticipant_ =
  1380. java.util.Collections.unmodifiableList(result.removedParticipant_);
  1381. }
  1382. if (result.document_ != java.util.Collections.EMPTY_LIST) {
  1383. result.document_ =
  1384. java.util.Collections.unmodifiableList(result.document_);
  1385. }
  1386. org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot returnMe = result;
  1387. result = null;
  1388. return returnMe;
  1389. }
  1390. public Builder mergeFrom(com.google.protobuf.Message other) {
  1391. if (other instanceof org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot) {
  1392. return mergeFrom((org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot)other);
  1393. } else {
  1394. super.mergeFrom(other);
  1395. return this;
  1396. }
  1397. }
  1398. public Builder mergeFrom(org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot other) {
  1399. if (other == org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.getDefaultInstance()) return this;
  1400. if (other.hasWaveletId()) {
  1401. setWaveletId(other.getWaveletId());
  1402. }
  1403. if (!other.participant_.isEmpty()) {
  1404. if (result.participant_.isEmpty()) {
  1405. result.participant_ = new java.util.ArrayList<java.lang.String>();
  1406. }
  1407. result.participant_.addAll(other.participant_);
  1408. }
  1409. if (!other.addedParticipant_.isEmpty()) {
  1410. if (result.addedParticipant_.isEmpty()) {
  1411. result.addedParticipant_ = new java.util.ArrayList<java.lang.String>();
  1412. }
  1413. result.addedParticipant_.addAll(other.addedParticipant_);
  1414. }
  1415. if (!other.removedParticipant_.isEmpty()) {
  1416. if (result.removedParticipant_.isEmpty()) {
  1417. result.removedParticipant_ = new java.util.ArrayList<java.lang.String>();
  1418. }
  1419. result.removedParticipant_.addAll(other.removedParticipant_);
  1420. }
  1421. if (!other.document_.isEmpty()) {
  1422. if (result.document_.isEmpty()) {
  1423. result.document_ = new java.util.ArrayList<org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot>();
  1424. }
  1425. result.document_.addAll(other.document_);
  1426. }
  1427. if (other.hasVersion()) {
  1428. mergeVersion(other.getVersion());
  1429. }
  1430. if (other.hasLastModifiedTime()) {
  1431. setLastModifiedTime(other.getLastModifiedTime());
  1432. }
  1433. if (other.hasCreator()) {
  1434. setCreator(other.getCreator());
  1435. }
  1436. if (other.hasCreationTime()) {
  1437. setCreationTime(other.getCreationTime());
  1438. }
  1439. this.mergeUnknownFields(other.getUnknownFields());
  1440. return this;
  1441. }
  1442. public Builder mergeFrom(
  1443. com.google.protobuf.CodedInputStream input,
  1444. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1445. throws java.io.IOException {
  1446. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  1447. com.google.protobuf.UnknownFieldSet.newBuilder(
  1448. this.getUnknownFields());
  1449. while (true) {
  1450. int tag = input.readTag();
  1451. switch (tag) {
  1452. case 0:
  1453. this.setUnknownFields(unknownFields.build());
  1454. return this;
  1455. default: {
  1456. if (!parseUnknownField(input, unknownFields,
  1457. extensionRegistry, tag)) {
  1458. this.setUnknownFields(unknownFields.build());
  1459. return this;
  1460. }
  1461. break;
  1462. }
  1463. case 10: {
  1464. setWaveletId(input.readString());
  1465. break;
  1466. }
  1467. case 18: {
  1468. addParticipant(input.readString());
  1469. break;
  1470. }
  1471. case 26: {
  1472. org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot.Builder subBuilder = org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot.newBuilder();
  1473. input.readMessage(subBuilder, extensionRegistry);
  1474. addDocument(subBuilder.buildPartial());
  1475. break;
  1476. }
  1477. case 34: {
  1478. org.waveprotocol.wave.federation.Proto.ProtocolHashedVersion.Builder subBuilder = org.waveprotocol.wave.federation.Proto.ProtocolHashedVersion.newBuilder();
  1479. if (hasVersion()) {
  1480. subBuilder.mergeFrom(getVersion());
  1481. }
  1482. input.readMessage(subBuilder, extensionRegistry);
  1483. setVersion(subBuilder.buildPartial());
  1484. break;
  1485. }
  1486. case 40: {
  1487. setLastModifiedTime(input.readInt64());
  1488. break;
  1489. }
  1490. case 50: {
  1491. setCreator(input.readString());
  1492. break;
  1493. }
  1494. case 56: {
  1495. setCreationTime(input.readInt64());
  1496. break;
  1497. }
  1498. case 170: {
  1499. addAddedParticipant(input.readString());
  1500. break;
  1501. }
  1502. case 178: {
  1503. addRemovedParticipant(input.readString());
  1504. break;
  1505. }
  1506. }
  1507. }
  1508. }
  1509. // required string waveletId = 1;
  1510. public boolean hasWaveletId() {
  1511. return result.hasWaveletId();
  1512. }
  1513. public java.lang.String getWaveletId() {
  1514. return result.getWaveletId();
  1515. }
  1516. public Builder setWaveletId(java.lang.String value) {
  1517. if (value == null) {
  1518. throw new NullPointerException();
  1519. }
  1520. result.hasWaveletId = true;
  1521. result.waveletId_ = value;
  1522. return this;
  1523. }
  1524. public Builder clearWaveletId() {
  1525. result.hasWaveletId = false;
  1526. result.waveletId_ = getDefaultInstance().getWaveletId();
  1527. return this;
  1528. }
  1529. // repeated string participant = 2;
  1530. public java.util.List<java.lang.String> getParticipantList() {
  1531. return java.util.Collections.unmodifiableList(result.participant_);
  1532. }
  1533. public int getParticipantCount() {
  1534. return result.getParticipantCount();
  1535. }
  1536. public java.lang.String getParticipant(int index) {
  1537. return result.getParticipant(index);
  1538. }
  1539. public Builder setParticipant(int index, java.lang.String value) {
  1540. if (value == null) {
  1541. throw new NullPointerException();
  1542. }
  1543. result.participant_.set(index, value);
  1544. return this;
  1545. }
  1546. public Builder addParticipant(java.lang.String value) {
  1547. if (value == null) {
  1548. throw new NullPointerException();
  1549. }
  1550. if (result.participant_.isEmpty()) {
  1551. result.participant_ = new java.util.ArrayList<java.lang.String>();
  1552. }
  1553. result.participant_.add(value);
  1554. return this;
  1555. }
  1556. public Builder addAllParticipant(
  1557. java.lang.Iterable<? extends java.lang.String> values) {
  1558. if (result.participant_.isEmpty()) {
  1559. result.participant_ = new java.util.ArrayList<java.lang.String>();
  1560. }
  1561. super.addAll(values, result.participant_);
  1562. return this;
  1563. }
  1564. public Builder clearParticipant() {
  1565. result.participant_ = java.util.Collections.emptyList();
  1566. return this;
  1567. }
  1568. // repeated string addedParticipant = 21;
  1569. public java.util.List<java.lang.String> getAddedParticipantList() {
  1570. return java.util.Collections.unmodifiableList(result.addedParticipant_);
  1571. }
  1572. public int getAddedParticipantCount() {
  1573. return result.getAddedParticipantCount();
  1574. }
  1575. public java.lang.String getAddedParticipant(int index) {
  1576. return result.getAddedParticipant(index);
  1577. }
  1578. public Builder setAddedParticipant(int index, java.lang.String value) {
  1579. if (value == null) {
  1580. throw new NullPointerException();
  1581. }
  1582. result.addedParticipant_.set(index, value);
  1583. return this;
  1584. }
  1585. public Builder addAddedParticipant(java.lang.String value) {
  1586. if (value == null) {
  1587. throw new NullPointerException();
  1588. }
  1589. if (result.addedParticipant_.isEmpty()) {
  1590. result.addedParticipant_ = new java.util.ArrayList<java.lang.String>();
  1591. }
  1592. result.addedParticipant_.add(value);
  1593. return this;
  1594. }
  1595. public Builder addAllAddedParticipant(
  1596. java.lang.Iterable<? extends java.lang.String> values) {
  1597. if (result.addedParticipant_.isEmpty()) {
  1598. result.addedParticipant_ = new java.util.ArrayList<java.lang.String>();
  1599. }
  1600. super.addAll(values, result.addedParticipant_);
  1601. return this;
  1602. }
  1603. public Builder clearAddedParticipant() {
  1604. result.addedParticipant_ = java.util.Collections.emptyList();
  1605. return this;
  1606. }
  1607. // repeated string removedParticipant = 22;
  1608. public java.util.List<java.lang.String> getRemovedParticipantList() {
  1609. return java.util.Collections.unmodifiableList(result.removedParticipant_);
  1610. }
  1611. public int getRemovedParticipantCount() {
  1612. return result.getRemovedParticipantCount();
  1613. }
  1614. public java.lang.String getRemovedParticipant(int index) {
  1615. return result.getRemovedParticipant(index);
  1616. }
  1617. public Builder setRemovedParticipant(int index, java.lang.String value) {
  1618. if (value == null) {
  1619. throw new NullPointerException();
  1620. }
  1621. result.removedParticipant_.set(index, value);
  1622. return this;
  1623. }
  1624. public Builder addRemovedParticipant(java.lang.String value) {
  1625. if (value == null) {
  1626. throw new NullPointerException();
  1627. }
  1628. if (result.removedParticipant_.isEmpty()) {
  1629. result.removedParticipant_ = new java.util.ArrayList<java.lang.String>();
  1630. }
  1631. result.removedParticipant_.add(value);
  1632. return this;
  1633. }
  1634. public Builder addAllRemovedParticipant(
  1635. java.lang.Iterable<? extends java.lang.String> values) {
  1636. if (result.removedParticipant_.isEmpty()) {
  1637. result.removedParticipant_ = new java.util.ArrayList<java.lang.String>();
  1638. }
  1639. super.addAll(values, result.removedParticipant_);
  1640. return this;
  1641. }
  1642. public Builder clearRemovedParticipant() {
  1643. result.removedParticipant_ = java.util.Collections.emptyList();
  1644. return this;
  1645. }
  1646. // repeated .diff.DocumentDiffSnapshot document = 3;
  1647. public java.util.List<org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot> getDocumentList() {
  1648. return java.util.Collections.unmodifiableList(result.document_);
  1649. }
  1650. public int getDocumentCount() {
  1651. return result.getDocumentCount();
  1652. }
  1653. public org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot getDocument(int index) {
  1654. return result.getDocument(index);
  1655. }
  1656. public Builder setDocument(int index, org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot value) {
  1657. if (value == null) {
  1658. throw new NullPointerException();
  1659. }
  1660. result.document_.set(index, value);
  1661. return this;
  1662. }
  1663. public Builder setDocument(int index, org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot.Builder builderForValue) {
  1664. result.document_.set(index, builderForValue.build());
  1665. return this;
  1666. }
  1667. public Builder addDocument(org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot value) {
  1668. if (value == null) {
  1669. throw new NullPointerException();
  1670. }
  1671. if (result.document_.isEmpty()) {
  1672. result.document_ = new java.util.ArrayList<org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot>();
  1673. }
  1674. result.document_.add(value);
  1675. return this;
  1676. }
  1677. public Builder addDocument(org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot.Builder builderForValue) {
  1678. if (result.document_.isEmpty()) {
  1679. result.document_ = new java.util.ArrayList<org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot>();
  1680. }
  1681. result.document_.add(builderForValue.build());
  1682. return this;
  1683. }
  1684. public Builder addAllDocument(
  1685. java.lang.Iterable<? extends org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot> values) {
  1686. if (result.document_.isEmpty()) {
  1687. result.document_ = new java.util.ArrayList<org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot>();
  1688. }
  1689. super.addAll(values, result.document_);
  1690. return this;
  1691. }
  1692. public Builder clearDocument() {
  1693. result.document_ = java.util.Collections.emptyList();
  1694. return this;
  1695. }
  1696. // required .federation.ProtocolHashedVersion version = 4;
  1697. public boolean hasVersion() {
  1698. return result.hasVersion();
  1699. }
  1700. public org.waveprotocol.wave.federation.Proto.ProtocolHashedVersion getVersion() {
  1701. return result.getVersion();
  1702. }
  1703. public Builder setVersion(org.waveprotocol.wave.federation.Proto.ProtocolHashedVersion value) {
  1704. if (value == null) {
  1705. throw new NullPointerException();
  1706. }
  1707. result.hasVersion = true;
  1708. result.version_ = value;
  1709. return this;
  1710. }
  1711. public Builder setVersion(org.waveprotocol.wave.federation.Proto.ProtocolHashedVersion.Builder builderForValue) {
  1712. result.hasVersion = true;
  1713. result.version_ = builderForValue.build();
  1714. return this;
  1715. }
  1716. public Builder mergeVersion(org.waveprotocol.wave.federation.Proto.ProtocolHashedVersion value) {
  1717. if (result.hasVersion() &&
  1718. result.version_ != org.waveprotocol.wave.federation.Proto.ProtocolHashedVersion.getDefaultInstance()) {
  1719. result.version_ =
  1720. org.waveprotocol.wave.federation.Proto.ProtocolHashedVersion.newBuilder(result.version_).mergeFrom(value).buildPartial();
  1721. } else {
  1722. result.version_ = value;
  1723. }
  1724. result.hasVersion = true;
  1725. return this;
  1726. }
  1727. public Builder clearVersion() {
  1728. result.hasVersion = false;
  1729. result.version_ = org.waveprotocol.wave.federation.Proto.ProtocolHashedVersion.getDefaultInstance();
  1730. return this;
  1731. }
  1732. // required int64 lastModifiedTime = 5;
  1733. public boolean hasLastModifiedTime() {
  1734. return result.hasLastModifiedTime();
  1735. }
  1736. public long getLastModifiedTime() {
  1737. return result.getLastModifiedTime();
  1738. }
  1739. public Builder setLastModifiedTime(long value) {
  1740. result.hasLastModifiedTime = true;
  1741. result.lastModifiedTime_ = value;
  1742. return this;
  1743. }
  1744. public Builder clearLastModifiedTime() {
  1745. result.hasLastModifiedTime = false;
  1746. result.lastModifiedTime_ = 0L;
  1747. return this;
  1748. }
  1749. // required string creator = 6;
  1750. public boolean hasCreator() {
  1751. return result.hasCreator();
  1752. }
  1753. public java.lang.String getCreator() {
  1754. return result.getCreator();
  1755. }
  1756. public Builder setCreator(java.lang.String value) {
  1757. if (value == null) {
  1758. throw new NullPointerException();
  1759. }
  1760. result.hasCreator = true;
  1761. result.creator_ = value;
  1762. return this;
  1763. }
  1764. public Builder clearCreator() {
  1765. result.hasCreator = false;
  1766. result.creator_ = getDefaultInstance().getCreator();
  1767. return this;
  1768. }
  1769. // required int64 creationTime = 7;
  1770. public boolean hasCreationTime() {
  1771. return result.hasCreationTime();
  1772. }
  1773. public long getCreationTime() {
  1774. return result.getCreationTime();
  1775. }
  1776. public Builder setCreationTime(long value) {
  1777. result.hasCreationTime = true;
  1778. result.creationTime_ = value;
  1779. return this;
  1780. }
  1781. public Builder clearCreationTime() {
  1782. result.hasCreationTime = false;
  1783. result.creationTime_ = 0L;
  1784. return this;
  1785. }
  1786. // @@protoc_insertion_point(builder_scope:diff.WaveletDiffSnapshot)
  1787. }
  1788. static {
  1789. defaultInstance = new WaveletDiffSnapshot(true);
  1790. org.waveprotocol.wave.diff.Diff.internalForceInit();
  1791. defaultInstance.initFields();
  1792. }
  1793. // @@protoc_insertion_point(class_scope:diff.WaveletDiffSnapshot)
  1794. }
  1795. public static final class DocumentDiffSnapshot extends
  1796. com.google.protobuf.GeneratedMessage {
  1797. // Use DocumentDiffSnapshot.newBuilder() to construct.
  1798. private DocumentDiffSnapshot() {
  1799. initFields();
  1800. }
  1801. private DocumentDiffSnapshot(boolean noInit) {}
  1802. private static final DocumentDiffSnapshot defaultInstance;
  1803. public static DocumentDiffSnapshot getDefaultInstance() {
  1804. return defaultInstance;
  1805. }
  1806. public DocumentDiffSnapshot getDefaultInstanceForType() {
  1807. return defaultInstance;
  1808. }
  1809. public static final com.google.protobuf.Descriptors.Descriptor
  1810. getDescriptor() {
  1811. return org.waveprotocol.wave.diff.Diff.internal_static_diff_DocumentDiffSnapshot_descriptor;
  1812. }
  1813. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1814. internalGetFieldAccessorTable() {
  1815. return org.waveprotocol.wave.diff.Diff.internal_static_diff_DocumentDiffSnapshot_fieldAccessorTable;
  1816. }
  1817. // required string documentId = 1;
  1818. public static final int DOCUMENTID_FIELD_NUMBER = 1;
  1819. private boolean hasDocumentId;
  1820. private java.lang.String documentId_ = "";
  1821. public boolean hasDocumentId() { return hasDocumentId; }
  1822. public java.lang.String getDocumentId() { return documentId_; }
  1823. // optional .federation.ProtocolDocumentOperation state = 2;
  1824. public static final int STATE_FIELD_NUMBER = 2;
  1825. private boolean hasState;
  1826. private org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation state_;
  1827. public boolean hasState() { return hasState; }
  1828. public org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation getState() { return state_; }
  1829. // optional .federation.ProtocolDocumentOperation diff = 21;
  1830. public static final int DIFF_FIELD_NUMBER = 21;
  1831. private boolean hasDiff;
  1832. private org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation diff_;
  1833. public boolean hasDiff() { return hasDiff; }
  1834. public org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation getDiff() { return diff_; }
  1835. // required string author = 3;
  1836. public static final int AUTHOR_FIELD_NUMBER = 3;
  1837. private boolean hasAuthor;
  1838. private java.lang.String author_ = "";
  1839. public boolean hasAuthor() { return hasAuthor; }
  1840. public java.lang.String getAuthor() { return author_; }
  1841. // repeated string contributor = 4;
  1842. public static final int CONTRIBUTOR_FIELD_NUMBER = 4;
  1843. private java.util.List<java.lang.String> contributor_ =
  1844. java.util.Collections.emptyList();
  1845. public java.util.List<java.lang.String> getContributorList() {
  1846. return contributor_;
  1847. }
  1848. public int getContributorCount() { return contributor_.size(); }
  1849. public java.lang.String getContributor(int index) {
  1850. return contributor_.get(index);
  1851. }
  1852. // repeated string addedContributor = 22;
  1853. public static final int ADDEDCONTRIBUTOR_FIELD_NUMBER = 22;
  1854. private java.util.List<java.lang.String> addedContributor_ =
  1855. java.util.Collections.emptyList();
  1856. public java.util.List<java.lang.String> getAddedContributorList() {
  1857. return addedContributor_;
  1858. }
  1859. public int getAddedContributorCount() { return addedContributor_.size(); }
  1860. public java.lang.String getAddedContributor(int index) {
  1861. return addedContributor_.get(index);
  1862. }
  1863. // repeated string removedContributor = 23;
  1864. public static final int REMOVEDCONTRIBUTOR_FIELD_NUMBER = 23;
  1865. private java.util.List<java.lang.String> removedContributor_ =
  1866. java.util.Collections.emptyList();
  1867. public java.util.List<java.lang.String> getRemovedContributorList() {
  1868. return removedContributor_;
  1869. }
  1870. public int getRemovedContributorCount() { return removedContributor_.size(); }
  1871. public java.lang.String getRemovedContributor(int index) {
  1872. return removedContributor_.get(index);
  1873. }
  1874. // required int64 lastModifiedVersion = 5;
  1875. public static final int LASTMODIFIEDVERSION_FIELD_NUMBER = 5;
  1876. private boolean hasLastModifiedVersion;
  1877. private long lastModifiedVersion_ = 0L;
  1878. public boolean hasLastModifiedVersion() { return hasLastModifiedVersion; }
  1879. public long getLastModifiedVersion() { return lastModifiedVersion_; }
  1880. // required int64 lastModifiedTime = 6;
  1881. public static final int LASTMODIFIEDTIME_FIELD_NUMBER = 6;
  1882. private boolean hasLastModifiedTime;
  1883. private long lastModifiedTime_ = 0L;
  1884. public boolean hasLastModifiedTime() { return hasLastModifiedTime; }
  1885. public long getLastModifiedTime() { return lastModifiedTime_; }
  1886. private void initFields() {
  1887. state_ = org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation.getDefaultInstance();
  1888. diff_ = org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation.getDefaultInstance();
  1889. }
  1890. public final boolean isInitialized() {
  1891. if (!hasDocumentId) return false;
  1892. if (!hasAuthor) return false;
  1893. if (!hasLastModifiedVersion) return false;
  1894. if (!hasLastModifiedTime) return false;
  1895. if (hasState()) {
  1896. if (!getState().isInitialized()) return false;
  1897. }
  1898. if (hasDiff()) {
  1899. if (!getDiff().isInitialized()) return false;
  1900. }
  1901. return true;
  1902. }
  1903. public void writeTo(com.google.protobuf.CodedOutputStream output)
  1904. throws java.io.IOException {
  1905. getSerializedSize();
  1906. if (hasDocumentId()) {
  1907. output.writeString(1, getDocumentId());
  1908. }
  1909. if (hasState()) {
  1910. output.writeMessage(2, getState());
  1911. }
  1912. if (hasAuthor()) {
  1913. output.writeString(3, getAuthor());
  1914. }
  1915. for (java.lang.String element : getContributorList()) {
  1916. output.writeString(4, element);
  1917. }
  1918. if (hasLastModifiedVersion()) {
  1919. output.writeInt64(5, getLastModifiedVersion());
  1920. }
  1921. if (hasLastModifiedTime()) {
  1922. output.writeInt64(6, getLastModifiedTime());
  1923. }
  1924. if (hasDiff()) {
  1925. output.writeMessage(21, getDiff());
  1926. }
  1927. for (java.lang.String element : getAddedContributorList()) {
  1928. output.writeString(22, element);
  1929. }
  1930. for (java.lang.String element : getRemovedContributorList()) {
  1931. output.writeString(23, element);
  1932. }
  1933. getUnknownFields().writeTo(output);
  1934. }
  1935. private int memoizedSerializedSize = -1;
  1936. public int getSerializedSize() {
  1937. int size = memoizedSerializedSize;
  1938. if (size != -1) return size;
  1939. size = 0;
  1940. if (hasDocumentId()) {
  1941. size += com.google.protobuf.CodedOutputStream
  1942. .computeStringSize(1, getDocumentId());
  1943. }
  1944. if (hasState()) {
  1945. size += com.google.protobuf.CodedOutputStream
  1946. .computeMessageSize(2, getState());
  1947. }
  1948. if (hasAuthor()) {
  1949. size += com.google.protobuf.CodedOutputStream
  1950. .computeStringSize(3, getAuthor());
  1951. }
  1952. {
  1953. int dataSize = 0;
  1954. for (java.lang.String element : getContributorList()) {
  1955. dataSize += com.google.protobuf.CodedOutputStream
  1956. .computeStringSizeNoTag(element);
  1957. }
  1958. size += dataSize;
  1959. size += 1 * getContributorList().size();
  1960. }
  1961. if (hasLastModifiedVersion()) {
  1962. size += com.google.protobuf.CodedOutputStream
  1963. .computeInt64Size(5, getLastModifiedVersion());
  1964. }
  1965. if (hasLastModifiedTime()) {
  1966. size += com.google.protobuf.CodedOutputStream
  1967. .computeInt64Size(6, getLastModifiedTime());
  1968. }
  1969. if (hasDiff()) {
  1970. size += com.google.protobuf.CodedOutputStream
  1971. .computeMessageSize(21, getDiff());
  1972. }
  1973. {
  1974. int dataSize = 0;
  1975. for (java.lang.String element : getAddedContributorList()) {
  1976. dataSize += com.google.protobuf.CodedOutputStream
  1977. .computeStringSizeNoTag(element);
  1978. }
  1979. size += dataSize;
  1980. size += 2 * getAddedContributorList().size();
  1981. }
  1982. {
  1983. int dataSize = 0;
  1984. for (java.lang.String element : getRemovedContributorList()) {
  1985. dataSize += com.google.protobuf.CodedOutputStream
  1986. .computeStringSizeNoTag(element);
  1987. }
  1988. size += dataSize;
  1989. size += 2 * getRemovedContributorList().size();
  1990. }
  1991. size += getUnknownFields().getSerializedSize();
  1992. memoizedSerializedSize = size;
  1993. return size;
  1994. }
  1995. public static org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot parseFrom(
  1996. com.google.protobuf.ByteString data)
  1997. throws com.google.protobuf.InvalidProtocolBufferException {
  1998. return newBuilder().mergeFrom(data).buildParsed();
  1999. }
  2000. public static org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot parseFrom(
  2001. com.google.protobuf.ByteString data,
  2002. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2003. throws com.google.protobuf.InvalidProtocolBufferException {
  2004. return newBuilder().mergeFrom(data, extensionRegistry)
  2005. .buildParsed();
  2006. }
  2007. public static org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot parseFrom(byte[] data)
  2008. throws com.google.protobuf.InvalidProtocolBufferException {
  2009. return newBuilder().mergeFrom(data).buildParsed();
  2010. }
  2011. public static org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot parseFrom(
  2012. byte[] data,
  2013. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2014. throws com.google.protobuf.InvalidProtocolBufferException {
  2015. return newBuilder().mergeFrom(data, extensionRegistry)
  2016. .buildParsed();
  2017. }
  2018. public static org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot parseFrom(java.io.InputStream input)
  2019. throws java.io.IOException {
  2020. return newBuilder().mergeFrom(input).buildParsed();
  2021. }
  2022. public static org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot parseFrom(
  2023. java.io.InputStream input,
  2024. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2025. throws java.io.IOException {
  2026. return newBuilder().mergeFrom(input, extensionRegistry)
  2027. .buildParsed();
  2028. }
  2029. public static org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot parseDelimitedFrom(java.io.InputStream input)
  2030. throws java.io.IOException {
  2031. Builder builder = newBuilder();
  2032. if (builder.mergeDelimitedFrom(input)) {
  2033. return builder.buildParsed();
  2034. } else {
  2035. return null;
  2036. }
  2037. }
  2038. public static org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot parseDelimitedFrom(
  2039. java.io.InputStream input,
  2040. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2041. throws java.io.IOException {
  2042. Builder builder = newBuilder();
  2043. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  2044. return builder.buildParsed();
  2045. } else {
  2046. return null;
  2047. }
  2048. }
  2049. public static org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot parseFrom(
  2050. com.google.protobuf.CodedInputStream input)
  2051. throws java.io.IOException {
  2052. return newBuilder().mergeFrom(input).buildParsed();
  2053. }
  2054. public static org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot parseFrom(
  2055. com.google.protobuf.CodedInputStream input,
  2056. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2057. throws java.io.IOException {
  2058. return newBuilder().mergeFrom(input, extensionRegistry)
  2059. .buildParsed();
  2060. }
  2061. public static Builder newBuilder() { return Builder.create(); }
  2062. public Builder newBuilderForType() { return newBuilder(); }
  2063. public static Builder newBuilder(org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot prototype) {
  2064. return newBuilder().mergeFrom(prototype);
  2065. }
  2066. public Builder toBuilder() { return newBuilder(this); }
  2067. public static final class Builder extends
  2068. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  2069. private org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot result;
  2070. // Construct using org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot.newBuilder()
  2071. private Builder() {}
  2072. private static Builder create() {
  2073. Builder builder = new Builder();
  2074. builder.result = new org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot();
  2075. return builder;
  2076. }
  2077. protected org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot internalGetResult() {
  2078. return result;
  2079. }
  2080. public Builder clear() {
  2081. if (result == null) {
  2082. throw new IllegalStateException(
  2083. "Cannot call clear() after build().");
  2084. }
  2085. result = new org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot();
  2086. return this;
  2087. }
  2088. public Builder clone() {
  2089. return create().mergeFrom(result);
  2090. }
  2091. public com.google.protobuf.Descriptors.Descriptor
  2092. getDescriptorForType() {
  2093. return org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot.getDescriptor();
  2094. }
  2095. public org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot getDefaultInstanceForType() {
  2096. return org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot.getDefaultInstance();
  2097. }
  2098. public boolean isInitialized() {
  2099. return result.isInitialized();
  2100. }
  2101. public org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot build() {
  2102. if (result != null && !isInitialized()) {
  2103. throw newUninitializedMessageException(result);
  2104. }
  2105. return buildPartial();
  2106. }
  2107. private org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot buildParsed()
  2108. throws com.google.protobuf.InvalidProtocolBufferException {
  2109. if (!isInitialized()) {
  2110. throw newUninitializedMessageException(
  2111. result).asInvalidProtocolBufferException();
  2112. }
  2113. return buildPartial();
  2114. }
  2115. public org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot buildPartial() {
  2116. if (result == null) {
  2117. throw new IllegalStateException(
  2118. "build() has already been called on this Builder.");
  2119. }
  2120. if (result.contributor_ != java.util.Collections.EMPTY_LIST) {
  2121. result.contributor_ =
  2122. java.util.Collections.unmodifiableList(result.contributor_);
  2123. }
  2124. if (result.addedContributor_ != java.util.Collections.EMPTY_LIST) {
  2125. result.addedContributor_ =
  2126. java.util.Collections.unmodifiableList(result.addedContributor_);
  2127. }
  2128. if (result.removedContributor_ != java.util.Collections.EMPTY_LIST) {
  2129. result.removedContributor_ =
  2130. java.util.Collections.unmodifiableList(result.removedContributor_);
  2131. }
  2132. org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot returnMe = result;
  2133. result = null;
  2134. return returnMe;
  2135. }
  2136. public Builder mergeFrom(com.google.protobuf.Message other) {
  2137. if (other instanceof org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot) {
  2138. return mergeFrom((org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot)other);
  2139. } else {
  2140. super.mergeFrom(other);
  2141. return this;
  2142. }
  2143. }
  2144. public Builder mergeFrom(org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot other) {
  2145. if (other == org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot.getDefaultInstance()) return this;
  2146. if (other.hasDocumentId()) {
  2147. setDocumentId(other.getDocumentId());
  2148. }
  2149. if (other.hasState()) {
  2150. mergeState(other.getState());
  2151. }
  2152. if (other.hasDiff()) {
  2153. mergeDiff(other.getDiff());
  2154. }
  2155. if (other.hasAuthor()) {
  2156. setAuthor(other.getAuthor());
  2157. }
  2158. if (!other.contributor_.isEmpty()) {
  2159. if (result.contributor_.isEmpty()) {
  2160. result.contributor_ = new java.util.ArrayList<java.lang.String>();
  2161. }
  2162. result.contributor_.addAll(other.contributor_);
  2163. }
  2164. if (!other.addedContributor_.isEmpty()) {
  2165. if (result.addedContributor_.isEmpty()) {
  2166. result.addedContributor_ = new java.util.ArrayList<java.lang.String>();
  2167. }
  2168. result.addedContributor_.addAll(other.addedContributor_);
  2169. }
  2170. if (!other.removedContributor_.isEmpty()) {
  2171. if (result.removedContributor_.isEmpty()) {
  2172. result.removedContributor_ = new java.util.ArrayList<java.lang.String>();
  2173. }
  2174. result.removedContributor_.addAll(other.removedContributor_);
  2175. }
  2176. if (other.hasLastModifiedVersion()) {
  2177. setLastModifiedVersion(other.getLastModifiedVersion());
  2178. }
  2179. if (other.hasLastModifiedTime()) {
  2180. setLastModifiedTime(other.getLastModifiedTime());
  2181. }
  2182. this.mergeUnknownFields(other.getUnknownFields());
  2183. return this;
  2184. }
  2185. public Builder mergeFrom(
  2186. com.google.protobuf.CodedInputStream input,
  2187. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2188. throws java.io.IOException {
  2189. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  2190. com.google.protobuf.UnknownFieldSet.newBuilder(
  2191. this.getUnknownFields());
  2192. while (true) {
  2193. int tag = input.readTag();
  2194. switch (tag) {
  2195. case 0:
  2196. this.setUnknownFields(unknownFields.build());
  2197. return this;
  2198. default: {
  2199. if (!parseUnknownField(input, unknownFields,
  2200. extensionRegistry, tag)) {
  2201. this.setUnknownFields(unknownFields.build());
  2202. return this;
  2203. }
  2204. break;
  2205. }
  2206. case 10: {
  2207. setDocumentId(input.readString());
  2208. break;
  2209. }
  2210. case 18: {
  2211. org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation.Builder subBuilder = org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation.newBuilder();
  2212. if (hasState()) {
  2213. subBuilder.mergeFrom(getState());
  2214. }
  2215. input.readMessage(subBuilder, extensionRegistry);
  2216. setState(subBuilder.buildPartial());
  2217. break;
  2218. }
  2219. case 26: {
  2220. setAuthor(input.readString());
  2221. break;
  2222. }
  2223. case 34: {
  2224. addContributor(input.readString());
  2225. break;
  2226. }
  2227. case 40: {
  2228. setLastModifiedVersion(input.readInt64());
  2229. break;
  2230. }
  2231. case 48: {
  2232. setLastModifiedTime(input.readInt64());
  2233. break;
  2234. }
  2235. case 170: {
  2236. org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation.Builder subBuilder = org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation.newBuilder();
  2237. if (hasDiff()) {
  2238. subBuilder.mergeFrom(getDiff());
  2239. }
  2240. input.readMessage(subBuilder, extensionRegistry);
  2241. setDiff(subBuilder.buildPartial());
  2242. break;
  2243. }
  2244. case 178: {
  2245. addAddedContributor(input.readString());
  2246. break;
  2247. }
  2248. case 186: {
  2249. addRemovedContributor(input.readString());
  2250. break;
  2251. }
  2252. }
  2253. }
  2254. }
  2255. // required string documentId = 1;
  2256. public boolean hasDocumentId() {
  2257. return result.hasDocumentId();
  2258. }
  2259. public java.lang.String getDocumentId() {
  2260. return result.getDocumentId();
  2261. }
  2262. public Builder setDocumentId(java.lang.String value) {
  2263. if (value == null) {
  2264. throw new NullPointerException();
  2265. }
  2266. result.hasDocumentId = true;
  2267. result.documentId_ = value;
  2268. return this;
  2269. }
  2270. public Builder clearDocumentId() {
  2271. result.hasDocumentId = false;
  2272. result.documentId_ = getDefaultInstance().getDocumentId();
  2273. return this;
  2274. }
  2275. // optional .federation.ProtocolDocumentOperation state = 2;
  2276. public boolean hasState() {
  2277. return result.hasState();
  2278. }
  2279. public org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation getState() {
  2280. return result.getState();
  2281. }
  2282. public Builder setState(org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation value) {
  2283. if (value == null) {
  2284. throw new NullPointerException();
  2285. }
  2286. result.hasState = true;
  2287. result.state_ = value;
  2288. return this;
  2289. }
  2290. public Builder setState(org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation.Builder builderForValue) {
  2291. result.hasState = true;
  2292. result.state_ = builderForValue.build();
  2293. return this;
  2294. }
  2295. public Builder mergeState(org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation value) {
  2296. if (result.hasState() &&
  2297. result.state_ != org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation.getDefaultInstance()) {
  2298. result.state_ =
  2299. org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation.newBuilder(result.state_).mergeFrom(value).buildPartial();
  2300. } else {
  2301. result.state_ = value;
  2302. }
  2303. result.hasState = true;
  2304. return this;
  2305. }
  2306. public Builder clearState() {
  2307. result.hasState = false;
  2308. result.state_ = org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation.getDefaultInstance();
  2309. return this;
  2310. }
  2311. // optional .federation.ProtocolDocumentOperation diff = 21;
  2312. public boolean hasDiff() {
  2313. return result.hasDiff();
  2314. }
  2315. public org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation getDiff() {
  2316. return result.getDiff();
  2317. }
  2318. public Builder setDiff(org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation value) {
  2319. if (value == null) {
  2320. throw new NullPointerException();
  2321. }
  2322. result.hasDiff = true;
  2323. result.diff_ = value;
  2324. return this;
  2325. }
  2326. public Builder setDiff(org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation.Builder builderForValue) {
  2327. result.hasDiff = true;
  2328. result.diff_ = builderForValue.build();
  2329. return this;
  2330. }
  2331. public Builder mergeDiff(org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation value) {
  2332. if (result.hasDiff() &&
  2333. result.diff_ != org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation.getDefaultInstance()) {
  2334. result.diff_ =
  2335. org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation.newBuilder(result.diff_).mergeFrom(value).buildPartial();
  2336. } else {
  2337. result.diff_ = value;
  2338. }
  2339. result.hasDiff = true;
  2340. return this;
  2341. }
  2342. public Builder clearDiff() {
  2343. result.hasDiff = false;
  2344. result.diff_ = org.waveprotocol.wave.federation.Proto.ProtocolDocumentOperation.getDefaultInstance();
  2345. return this;
  2346. }
  2347. // required string author = 3;
  2348. public boolean hasAuthor() {
  2349. return result.hasAuthor();
  2350. }
  2351. public java.lang.String getAuthor() {
  2352. return result.getAuthor();
  2353. }
  2354. public Builder setAuthor(java.lang.String value) {
  2355. if (value == null) {
  2356. throw new NullPointerException();
  2357. }
  2358. result.hasAuthor = true;
  2359. result.author_ = value;
  2360. return this;
  2361. }
  2362. public Builder clearAuthor() {
  2363. result.hasAuthor = false;
  2364. result.author_ = getDefaultInstance().getAuthor();
  2365. return this;
  2366. }
  2367. // repeated string contributor = 4;
  2368. public java.util.List<java.lang.String> getContributorList() {
  2369. return java.util.Collections.unmodifiableList(result.contributor_);
  2370. }
  2371. public int getContributorCount() {
  2372. return result.getContributorCount();
  2373. }
  2374. public java.lang.String getContributor(int index) {
  2375. return result.getContributor(index);
  2376. }
  2377. public Builder setContributor(int index, java.lang.String value) {
  2378. if (value == null) {
  2379. throw new NullPointerException();
  2380. }
  2381. result.contributor_.set(index, value);
  2382. return this;
  2383. }
  2384. public Builder addContributor(java.lang.String value) {
  2385. if (value == null) {
  2386. throw new NullPointerException();
  2387. }
  2388. if (result.contributor_.isEmpty()) {
  2389. result.contributor_ = new java.util.ArrayList<java.lang.String>();
  2390. }
  2391. result.contributor_.add(value);
  2392. return this;
  2393. }
  2394. public Builder addAllContributor(
  2395. java.lang.Iterable<? extends java.lang.String> values) {
  2396. if (result.contributor_.isEmpty()) {
  2397. result.contributor_ = new java.util.ArrayList<java.lang.String>();
  2398. }
  2399. super.addAll(values, result.contributor_);
  2400. return this;
  2401. }
  2402. public Builder clearContributor() {
  2403. result.contributor_ = java.util.Collections.emptyList();
  2404. return this;
  2405. }
  2406. // repeated string addedContributor = 22;
  2407. public java.util.List<java.lang.String> getAddedContributorList() {
  2408. return java.util.Collections.unmodifiableList(result.addedContributor_);
  2409. }
  2410. public int getAddedContributorCount() {
  2411. return result.getAddedContributorCount();
  2412. }
  2413. public java.lang.String getAddedContributor(int index) {
  2414. return result.getAddedContributor(index);
  2415. }
  2416. public Builder setAddedContributor(int index, java.lang.String value) {
  2417. if (value == null) {
  2418. throw new NullPointerException();
  2419. }
  2420. result.addedContributor_.set(index, value);
  2421. return this;
  2422. }
  2423. public Builder addAddedContributor(java.lang.String value) {
  2424. if (value == null) {
  2425. throw new NullPointerException();
  2426. }
  2427. if (result.addedContributor_.isEmpty()) {
  2428. result.addedContributor_ = new java.util.ArrayList<java.lang.String>();
  2429. }
  2430. result.addedContributor_.add(value);
  2431. return this;
  2432. }
  2433. public Builder addAllAddedContributor(
  2434. java.lang.Iterable<? extends java.lang.String> values) {
  2435. if (result.addedContributor_.isEmpty()) {
  2436. result.addedContributor_ = new java.util.ArrayList<java.lang.String>();
  2437. }
  2438. super.addAll(values, result.addedContributor_);
  2439. return this;
  2440. }
  2441. public Builder clearAddedContributor() {
  2442. result.addedContributor_ = java.util.Collections.emptyList();
  2443. return this;
  2444. }
  2445. // repeated string removedContributor = 23;
  2446. public java.util.List<java.lang.String> getRemovedContributorList() {
  2447. return java.util.Collections.unmodifiableList(result.removedContributor_);
  2448. }
  2449. public int getRemovedContributorCount() {
  2450. return result.getRemovedContributorCount();
  2451. }
  2452. public java.lang.String getRemovedContributor(int index) {
  2453. return result.getRemovedContributor(index);
  2454. }
  2455. public Builder setRemovedContributor(int index, java.lang.String value) {
  2456. if (value == null) {
  2457. throw new NullPointerException();
  2458. }
  2459. result.removedContributor_.set(index, value);
  2460. return this;
  2461. }
  2462. public Builder addRemovedContributor(java.lang.String value) {
  2463. if (value == null) {
  2464. throw new NullPointerException();
  2465. }
  2466. if (result.removedContributor_.isEmpty()) {
  2467. result.removedContributor_ = new java.util.ArrayList<java.lang.String>();
  2468. }
  2469. result.removedContributor_.add(value);
  2470. return this;
  2471. }
  2472. public Builder addAllRemovedContributor(
  2473. java.lang.Iterable<? extends java.lang.String> values) {
  2474. if (result.removedContributor_.isEmpty()) {
  2475. result.removedContributor_ = new java.util.ArrayList<java.lang.String>();
  2476. }
  2477. super.addAll(values, result.removedContributor_);
  2478. return this;
  2479. }
  2480. public Builder clearRemovedContributor() {
  2481. result.removedContributor_ = java.util.Collections.emptyList();
  2482. return this;
  2483. }
  2484. // required int64 lastModifiedVersion = 5;
  2485. public boolean hasLastModifiedVersion() {
  2486. return result.hasLastModifiedVersion();
  2487. }
  2488. public long getLastModifiedVersion() {
  2489. return result.getLastModifiedVersion();
  2490. }
  2491. public Builder setLastModifiedVersion(long value) {
  2492. result.hasLastModifiedVersion = true;
  2493. result.lastModifiedVersion_ = value;
  2494. return this;
  2495. }
  2496. public Builder clearLastModifiedVersion() {
  2497. result.hasLastModifiedVersion = false;
  2498. result.lastModifiedVersion_ = 0L;
  2499. return this;
  2500. }
  2501. // required int64 lastModifiedTime = 6;
  2502. public boolean hasLastModifiedTime() {
  2503. return result.hasLastModifiedTime();
  2504. }
  2505. public long getLastModifiedTime() {
  2506. return result.getLastModifiedTime();
  2507. }
  2508. public Builder setLastModifiedTime(long value) {
  2509. result.hasLastModifiedTime = true;
  2510. result.lastModifiedTime_ = value;
  2511. return this;
  2512. }
  2513. public Builder clearLastModifiedTime() {
  2514. result.hasLastModifiedTime = false;
  2515. result.lastModifiedTime_ = 0L;
  2516. return this;
  2517. }
  2518. // @@protoc_insertion_point(builder_scope:diff.DocumentDiffSnapshot)
  2519. }
  2520. static {
  2521. defaultInstance = new DocumentDiffSnapshot(true);
  2522. org.waveprotocol.wave.diff.Diff.internalForceInit();
  2523. defaultInstance.initFields();
  2524. }
  2525. // @@protoc_insertion_point(class_scope:diff.DocumentDiffSnapshot)
  2526. }
  2527. public static abstract class FetchDiffService
  2528. implements com.google.protobuf.Service {
  2529. protected FetchDiffService() {}
  2530. public interface Interface {
  2531. public abstract void fetch(
  2532. com.google.protobuf.RpcController controller,
  2533. org.waveprotocol.wave.diff.Diff.FetchDiffRequest request,
  2534. com.google.protobuf.RpcCallback<org.waveprotocol.wave.diff.Diff.FetchDiffResponse> done);
  2535. }
  2536. public static com.google.protobuf.Service newReflectiveService(
  2537. final Interface impl) {
  2538. return new FetchDiffService() {
  2539. @Override
  2540. public void fetch(
  2541. com.google.protobuf.RpcController controller,
  2542. org.waveprotocol.wave.diff.Diff.FetchDiffRequest request,
  2543. com.google.protobuf.RpcCallback<org.waveprotocol.wave.diff.Diff.FetchDiffResponse> done) {
  2544. impl.fetch(controller, request, done);
  2545. }
  2546. };
  2547. }
  2548. public static com.google.protobuf.BlockingService
  2549. newReflectiveBlockingService(final BlockingInterface impl) {
  2550. return new com.google.protobuf.BlockingService() {
  2551. public final com.google.protobuf.Descriptors.ServiceDescriptor
  2552. getDescriptorForType() {
  2553. return getDescriptor();
  2554. }
  2555. public final com.google.protobuf.Message callBlockingMethod(
  2556. com.google.protobuf.Descriptors.MethodDescriptor method,
  2557. com.google.protobuf.RpcController controller,
  2558. com.google.protobuf.Message request)
  2559. throws com.google.protobuf.ServiceException {
  2560. if (method.getService() != getDescriptor()) {
  2561. throw new java.lang.IllegalArgumentException(
  2562. "Service.callBlockingMethod() given method descriptor for " +
  2563. "wrong service type.");
  2564. }
  2565. switch(method.getIndex()) {
  2566. case 0:
  2567. return impl.fetch(controller, (org.waveprotocol.wave.diff.Diff.FetchDiffRequest)request);
  2568. default:
  2569. throw new java.lang.AssertionError("Can't get here.");
  2570. }
  2571. }
  2572. public final com.google.protobuf.Message
  2573. getRequestPrototype(
  2574. com.google.protobuf.Descriptors.MethodDescriptor method) {
  2575. if (method.getService() != getDescriptor()) {
  2576. throw new java.lang.IllegalArgumentException(
  2577. "Service.getRequestPrototype() given method " +
  2578. "descriptor for wrong service type.");
  2579. }
  2580. switch(method.getIndex()) {
  2581. case 0:
  2582. return org.waveprotocol.wave.diff.Diff.FetchDiffRequest.getDefaultInstance();
  2583. default:
  2584. throw new java.lang.AssertionError("Can't get here.");
  2585. }
  2586. }
  2587. public final com.google.protobuf.Message
  2588. getResponsePrototype(
  2589. com.google.protobuf.Descriptors.MethodDescriptor method) {
  2590. if (method.getService() != getDescriptor()) {
  2591. throw new java.lang.IllegalArgumentException(
  2592. "Service.getResponsePrototype() given method " +
  2593. "descriptor for wrong service type.");
  2594. }
  2595. switch(method.getIndex()) {
  2596. case 0:
  2597. return org.waveprotocol.wave.diff.Diff.FetchDiffResponse.getDefaultInstance();
  2598. default:
  2599. throw new java.lang.AssertionError("Can't get here.");
  2600. }
  2601. }
  2602. };
  2603. }
  2604. public abstract void fetch(
  2605. com.google.protobuf.RpcController controller,
  2606. org.waveprotocol.wave.diff.Diff.FetchDiffRequest request,
  2607. com.google.protobuf.RpcCallback<org.waveprotocol.wave.diff.Diff.FetchDiffResponse> done);
  2608. public static final
  2609. com.google.protobuf.Descriptors.ServiceDescriptor
  2610. getDescriptor() {
  2611. return org.waveprotocol.wave.diff.Diff.getDescriptor().getServices().get(0);
  2612. }
  2613. public final com.google.protobuf.Descriptors.ServiceDescriptor
  2614. getDescriptorForType() {
  2615. return getDescriptor();
  2616. }
  2617. public final void callMethod(
  2618. com.google.protobuf.Descriptors.MethodDescriptor method,
  2619. com.google.protobuf.RpcController controller,
  2620. com.google.protobuf.Message request,
  2621. com.google.protobuf.RpcCallback<
  2622. com.google.protobuf.Message> done) {
  2623. if (method.getService() != getDescriptor()) {
  2624. throw new java.lang.IllegalArgumentException(
  2625. "Service.callMethod() given method descriptor for wrong " +
  2626. "service type.");
  2627. }
  2628. switch(method.getIndex()) {
  2629. case 0:
  2630. this.fetch(controller, (org.waveprotocol.wave.diff.Diff.FetchDiffRequest)request,
  2631. com.google.protobuf.RpcUtil.<org.waveprotocol.wave.diff.Diff.FetchDiffResponse>specializeCallback(
  2632. done));
  2633. return;
  2634. default:
  2635. throw new java.lang.AssertionError("Can't get here.");
  2636. }
  2637. }
  2638. public final com.google.protobuf.Message
  2639. getRequestPrototype(
  2640. com.google.protobuf.Descriptors.MethodDescriptor method) {
  2641. if (method.getService() != getDescriptor()) {
  2642. throw new java.lang.IllegalArgumentException(
  2643. "Service.getRequestPrototype() given method " +
  2644. "descriptor for wrong service type.");
  2645. }
  2646. switch(method.getIndex()) {
  2647. case 0:
  2648. return org.waveprotocol.wave.diff.Diff.FetchDiffRequest.getDefaultInstance();
  2649. default:
  2650. throw new java.lang.AssertionError("Can't get here.");
  2651. }
  2652. }
  2653. public final com.google.protobuf.Message
  2654. getResponsePrototype(
  2655. com.google.protobuf.Descriptors.MethodDescriptor method) {
  2656. if (method.getService() != getDescriptor()) {
  2657. throw new java.lang.IllegalArgumentException(
  2658. "Service.getResponsePrototype() given method " +
  2659. "descriptor for wrong service type.");
  2660. }
  2661. switch(method.getIndex()) {
  2662. case 0:
  2663. return org.waveprotocol.wave.diff.Diff.FetchDiffResponse.getDefaultInstance();
  2664. default:
  2665. throw new java.lang.AssertionError("Can't get here.");
  2666. }
  2667. }
  2668. public static Stub newStub(
  2669. com.google.protobuf.RpcChannel channel) {
  2670. return new Stub(channel);
  2671. }
  2672. public static final class Stub extends org.waveprotocol.wave.diff.Diff.FetchDiffService implements Interface {
  2673. private Stub(com.google.protobuf.RpcChannel channel) {
  2674. this.channel = channel;
  2675. }
  2676. private final com.google.protobuf.RpcChannel channel;
  2677. public com.google.protobuf.RpcChannel getChannel() {
  2678. return channel;
  2679. }
  2680. public void fetch(
  2681. com.google.protobuf.RpcController controller,
  2682. org.waveprotocol.wave.diff.Diff.FetchDiffRequest request,
  2683. com.google.protobuf.RpcCallback<org.waveprotocol.wave.diff.Diff.FetchDiffResponse> done) {
  2684. channel.callMethod(
  2685. getDescriptor().getMethods().get(0),
  2686. controller,
  2687. request,
  2688. org.waveprotocol.wave.diff.Diff.FetchDiffResponse.getDefaultInstance(),
  2689. com.google.protobuf.RpcUtil.generalizeCallback(
  2690. done,
  2691. org.waveprotocol.wave.diff.Diff.FetchDiffResponse.class,
  2692. org.waveprotocol.wave.diff.Diff.FetchDiffResponse.getDefaultInstance()));
  2693. }
  2694. }
  2695. public static BlockingInterface newBlockingStub(
  2696. com.google.protobuf.BlockingRpcChannel channel) {
  2697. return new BlockingStub(channel);
  2698. }
  2699. public interface BlockingInterface {
  2700. public org.waveprotocol.wave.diff.Diff.FetchDiffResponse fetch(
  2701. com.google.protobuf.RpcController controller,
  2702. org.waveprotocol.wave.diff.Diff.FetchDiffRequest request)
  2703. throws com.google.protobuf.ServiceException;
  2704. }
  2705. private static final class BlockingStub implements BlockingInterface {
  2706. private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) {
  2707. this.channel = channel;
  2708. }
  2709. private final com.google.protobuf.BlockingRpcChannel channel;
  2710. public org.waveprotocol.wave.diff.Diff.FetchDiffResponse fetch(
  2711. com.google.protobuf.RpcController controller,
  2712. org.waveprotocol.wave.diff.Diff.FetchDiffRequest request)
  2713. throws com.google.protobuf.ServiceException {
  2714. return (org.waveprotocol.wave.diff.Diff.FetchDiffResponse) channel.callBlockingMethod(
  2715. getDescriptor().getMethods().get(0),
  2716. controller,
  2717. request,
  2718. org.waveprotocol.wave.diff.Diff.FetchDiffResponse.getDefaultInstance());
  2719. }
  2720. }
  2721. }
  2722. private static com.google.protobuf.Descriptors.Descriptor
  2723. internal_static_diff_FetchDiffRequest_descriptor;
  2724. private static
  2725. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  2726. internal_static_diff_FetchDiffRequest_fieldAccessorTable;
  2727. private static com.google.protobuf.Descriptors.Descriptor
  2728. internal_static_diff_FetchDiffResponse_descriptor;
  2729. private static
  2730. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  2731. internal_static_diff_FetchDiffResponse_fieldAccessorTable;
  2732. private static com.google.protobuf.Descriptors.Descriptor
  2733. internal_static_diff_FetchDiffResponse_WaveletDiff_descriptor;
  2734. private static
  2735. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  2736. internal_static_diff_FetchDiffResponse_WaveletDiff_fieldAccessorTable;
  2737. private static com.google.protobuf.Descriptors.Descriptor
  2738. internal_static_diff_WaveletDiffSnapshot_descriptor;
  2739. private static
  2740. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  2741. internal_static_diff_WaveletDiffSnapshot_fieldAccessorTable;
  2742. private static com.google.protobuf.Descriptors.Descriptor
  2743. internal_static_diff_DocumentDiffSnapshot_descriptor;
  2744. private static
  2745. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  2746. internal_static_diff_DocumentDiffSnapshot_fieldAccessorTable;
  2747. public static com.google.protobuf.Descriptors.FileDescriptor
  2748. getDescriptor() {
  2749. return descriptor;
  2750. }
  2751. private static com.google.protobuf.Descriptors.FileDescriptor
  2752. descriptor;
  2753. static {
  2754. java.lang.String[] descriptorData = {
  2755. "\n%org/waveprotocol/wave/diff/diff.proto\022" +
  2756. "\004diff\032)org/waveprotocol/box/server/rpc/r" +
  2757. "pc.proto\032;org/waveprotocol/wave/concurre" +
  2758. "ncycontrol/clientserver.proto\0326org/wavep" +
  2759. "rotocol/wave/federation/federation.proto" +
  2760. "devel\032*org/waveprotocol/protobuf/extensi" +
  2761. "ons.proto\"\\\n\020FetchDiffRequest\022\016\n\006waveId\030" +
  2762. "\001 \002(\t\0228\n\014knownWavelet\030\002 \003(\0132\".concurrenc" +
  2763. "ycontrol.WaveletVersion\"\314\001\n\021FetchDiffRes" +
  2764. "ponse\0222\n\006status\030\001 \002(\0132\".concurrencycontr",
  2765. "ol.ResponseStatus\0224\n\007wavelet\030\002 \003(\0132#.dif" +
  2766. "f.FetchDiffResponse.WaveletDiff\032M\n\013Wavel" +
  2767. "etDiff\022\021\n\twaveletId\030\001 \002(\t\022+\n\010snapshot\030\002 " +
  2768. "\001(\0132\031.diff.WaveletDiffSnapshot\"\242\002\n\023Wavel" +
  2769. "etDiffSnapshot\022\021\n\twaveletId\030\001 \002(\t\022\023\n\013par" +
  2770. "ticipant\030\002 \003(\t\022\030\n\020addedParticipant\030\025 \003(\t" +
  2771. "\022\032\n\022removedParticipant\030\026 \003(\t\022,\n\010document" +
  2772. "\030\003 \003(\0132\032.diff.DocumentDiffSnapshot\0222\n\007ve" +
  2773. "rsion\030\004 \002(\0132!.federation.ProtocolHashedV" +
  2774. "ersion\022\036\n\020lastModifiedTime\030\005 \002(\003B\004\200\265\030\001\022\017",
  2775. "\n\007creator\030\006 \002(\t\022\032\n\014creationTime\030\007 \002(\003B\004\200" +
  2776. "\265\030\001\"\263\002\n\024DocumentDiffSnapshot\022\022\n\ndocument" +
  2777. "Id\030\001 \002(\t\0224\n\005state\030\002 \001(\0132%.federation.Pro" +
  2778. "tocolDocumentOperation\0223\n\004diff\030\025 \001(\0132%.f" +
  2779. "ederation.ProtocolDocumentOperation\022\016\n\006a" +
  2780. "uthor\030\003 \002(\t\022\023\n\013contributor\030\004 \003(\t\022\030\n\020adde" +
  2781. "dContributor\030\026 \003(\t\022\032\n\022removedContributor" +
  2782. "\030\027 \003(\t\022!\n\023lastModifiedVersion\030\005 \002(\003B\004\200\265\030" +
  2783. "\001\022\036\n\020lastModifiedTime\030\006 \002(\003B\004\200\265\030\0012L\n\020Fet" +
  2784. "chDiffService\0228\n\005Fetch\022\026.diff.FetchDiffR",
  2785. "equest\032\027.diff.FetchDiffResponseB\"\n\032org.w" +
  2786. "aveprotocol.wave.diffB\004Diff"
  2787. };
  2788. com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
  2789. new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
  2790. public com.google.protobuf.ExtensionRegistry assignDescriptors(
  2791. com.google.protobuf.Descriptors.FileDescriptor root) {
  2792. descriptor = root;
  2793. internal_static_diff_FetchDiffRequest_descriptor =
  2794. getDescriptor().getMessageTypes().get(0);
  2795. internal_static_diff_FetchDiffRequest_fieldAccessorTable = new
  2796. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  2797. internal_static_diff_FetchDiffRequest_descriptor,
  2798. new java.lang.String[] { "WaveId", "KnownWavelet", },
  2799. org.waveprotocol.wave.diff.Diff.FetchDiffRequest.class,
  2800. org.waveprotocol.wave.diff.Diff.FetchDiffRequest.Builder.class);
  2801. internal_static_diff_FetchDiffResponse_descriptor =
  2802. getDescriptor().getMessageTypes().get(1);
  2803. internal_static_diff_FetchDiffResponse_fieldAccessorTable = new
  2804. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  2805. internal_static_diff_FetchDiffResponse_descriptor,
  2806. new java.lang.String[] { "Status", "Wavelet", },
  2807. org.waveprotocol.wave.diff.Diff.FetchDiffResponse.class,
  2808. org.waveprotocol.wave.diff.Diff.FetchDiffResponse.Builder.class);
  2809. internal_static_diff_FetchDiffResponse_WaveletDiff_descriptor =
  2810. internal_static_diff_FetchDiffResponse_descriptor.getNestedTypes().get(0);
  2811. internal_static_diff_FetchDiffResponse_WaveletDiff_fieldAccessorTable = new
  2812. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  2813. internal_static_diff_FetchDiffResponse_WaveletDiff_descriptor,
  2814. new java.lang.String[] { "WaveletId", "Snapshot", },
  2815. org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.class,
  2816. org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.Builder.class);
  2817. internal_static_diff_WaveletDiffSnapshot_descriptor =
  2818. getDescriptor().getMessageTypes().get(2);
  2819. internal_static_diff_WaveletDiffSnapshot_fieldAccessorTable = new
  2820. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  2821. internal_static_diff_WaveletDiffSnapshot_descriptor,
  2822. new java.lang.String[] { "WaveletId", "Participant", "AddedParticipant", "RemovedParticipant", "Document", "Version", "LastModifiedTime", "Creator", "CreationTime", },
  2823. org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.class,
  2824. org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.Builder.class);
  2825. internal_static_diff_DocumentDiffSnapshot_descriptor =
  2826. getDescriptor().getMessageTypes().get(3);
  2827. internal_static_diff_DocumentDiffSnapshot_fieldAccessorTable = new
  2828. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  2829. internal_static_diff_DocumentDiffSnapshot_descriptor,
  2830. new java.lang.String[] { "DocumentId", "State", "Diff", "Author", "Contributor", "AddedContributor", "RemovedContributor", "LastModifiedVersion", "LastModifiedTime", },
  2831. org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot.class,
  2832. org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot.Builder.class);
  2833. com.google.protobuf.ExtensionRegistry registry =
  2834. com.google.protobuf.ExtensionRegistry.newInstance();
  2835. registerAllExtensions(registry);
  2836. org.waveprotocol.box.server.rpc.Rpc.registerAllExtensions(registry);
  2837. org.waveprotocol.wave.concurrencycontrol.ClientServer.registerAllExtensions(registry);
  2838. org.waveprotocol.wave.federation.Proto.registerAllExtensions(registry);
  2839. org.waveprotocol.protobuf.Extensions.registerAllExtensions(registry);
  2840. return registry;
  2841. }
  2842. };
  2843. com.google.protobuf.Descriptors.FileDescriptor
  2844. .internalBuildGeneratedFileFrom(descriptorData,
  2845. new com.google.protobuf.Descriptors.FileDescriptor[] {
  2846. org.waveprotocol.box.server.rpc.Rpc.getDescriptor(),
  2847. org.waveprotocol.wave.concurrencycontrol.ClientServer.getDescriptor(),
  2848. org.waveprotocol.wave.federation.Proto.getDescriptor(),
  2849. org.waveprotocol.protobuf.Extensions.getDescriptor(),
  2850. }, assigner);
  2851. }
  2852. public static void internalForceInit() {}
  2853. // @@protoc_insertion_point(outer_class_scope)
  2854. }