/proto_src/org/waveprotocol/wave/diff/Diff.java
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
Large files files are truncated, but you can click here to view the full file
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: org/waveprotocol/wave/diff/diff.proto
- package org.waveprotocol.wave.diff;
- public final class Diff {
- private Diff() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- }
- public static final class FetchDiffRequest extends
- com.google.protobuf.GeneratedMessage {
- // Use FetchDiffRequest.newBuilder() to construct.
- private FetchDiffRequest() {
- initFields();
- }
- private FetchDiffRequest(boolean noInit) {}
-
- private static final FetchDiffRequest defaultInstance;
- public static FetchDiffRequest getDefaultInstance() {
- return defaultInstance;
- }
-
- public FetchDiffRequest getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.waveprotocol.wave.diff.Diff.internal_static_diff_FetchDiffRequest_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.waveprotocol.wave.diff.Diff.internal_static_diff_FetchDiffRequest_fieldAccessorTable;
- }
-
- // required string waveId = 1;
- public static final int WAVEID_FIELD_NUMBER = 1;
- private boolean hasWaveId;
- private java.lang.String waveId_ = "";
- public boolean hasWaveId() { return hasWaveId; }
- public java.lang.String getWaveId() { return waveId_; }
-
- // repeated .concurrencycontrol.WaveletVersion knownWavelet = 2;
- public static final int KNOWNWAVELET_FIELD_NUMBER = 2;
- private java.util.List<org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion> knownWavelet_ =
- java.util.Collections.emptyList();
- public java.util.List<org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion> getKnownWaveletList() {
- return knownWavelet_;
- }
- public int getKnownWaveletCount() { return knownWavelet_.size(); }
- public org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion getKnownWavelet(int index) {
- return knownWavelet_.get(index);
- }
-
- private void initFields() {
- }
- public final boolean isInitialized() {
- if (!hasWaveId) return false;
- for (org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion element : getKnownWaveletList()) {
- if (!element.isInitialized()) return false;
- }
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (hasWaveId()) {
- output.writeString(1, getWaveId());
- }
- for (org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion element : getKnownWaveletList()) {
- output.writeMessage(2, element);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasWaveId()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(1, getWaveId());
- }
- for (org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion element : getKnownWaveletList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, element);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffRequest parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(org.waveprotocol.wave.diff.Diff.FetchDiffRequest prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder> {
- private org.waveprotocol.wave.diff.Diff.FetchDiffRequest result;
-
- // Construct using org.waveprotocol.wave.diff.Diff.FetchDiffRequest.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new org.waveprotocol.wave.diff.Diff.FetchDiffRequest();
- return builder;
- }
-
- protected org.waveprotocol.wave.diff.Diff.FetchDiffRequest internalGetResult() {
- return result;
- }
-
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new org.waveprotocol.wave.diff.Diff.FetchDiffRequest();
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.waveprotocol.wave.diff.Diff.FetchDiffRequest.getDescriptor();
- }
-
- public org.waveprotocol.wave.diff.Diff.FetchDiffRequest getDefaultInstanceForType() {
- return org.waveprotocol.wave.diff.Diff.FetchDiffRequest.getDefaultInstance();
- }
-
- public boolean isInitialized() {
- return result.isInitialized();
- }
- public org.waveprotocol.wave.diff.Diff.FetchDiffRequest build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private org.waveprotocol.wave.diff.Diff.FetchDiffRequest buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- public org.waveprotocol.wave.diff.Diff.FetchDiffRequest buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- if (result.knownWavelet_ != java.util.Collections.EMPTY_LIST) {
- result.knownWavelet_ =
- java.util.Collections.unmodifiableList(result.knownWavelet_);
- }
- org.waveprotocol.wave.diff.Diff.FetchDiffRequest returnMe = result;
- result = null;
- return returnMe;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.waveprotocol.wave.diff.Diff.FetchDiffRequest) {
- return mergeFrom((org.waveprotocol.wave.diff.Diff.FetchDiffRequest)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.waveprotocol.wave.diff.Diff.FetchDiffRequest other) {
- if (other == org.waveprotocol.wave.diff.Diff.FetchDiffRequest.getDefaultInstance()) return this;
- if (other.hasWaveId()) {
- setWaveId(other.getWaveId());
- }
- if (!other.knownWavelet_.isEmpty()) {
- if (result.knownWavelet_.isEmpty()) {
- result.knownWavelet_ = new java.util.ArrayList<org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion>();
- }
- result.knownWavelet_.addAll(other.knownWavelet_);
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- return this;
- }
- break;
- }
- case 10: {
- setWaveId(input.readString());
- break;
- }
- case 18: {
- org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion.Builder subBuilder = org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addKnownWavelet(subBuilder.buildPartial());
- break;
- }
- }
- }
- }
-
-
- // required string waveId = 1;
- public boolean hasWaveId() {
- return result.hasWaveId();
- }
- public java.lang.String getWaveId() {
- return result.getWaveId();
- }
- public Builder setWaveId(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasWaveId = true;
- result.waveId_ = value;
- return this;
- }
- public Builder clearWaveId() {
- result.hasWaveId = false;
- result.waveId_ = getDefaultInstance().getWaveId();
- return this;
- }
-
- // repeated .concurrencycontrol.WaveletVersion knownWavelet = 2;
- public java.util.List<org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion> getKnownWaveletList() {
- return java.util.Collections.unmodifiableList(result.knownWavelet_);
- }
- public int getKnownWaveletCount() {
- return result.getKnownWaveletCount();
- }
- public org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion getKnownWavelet(int index) {
- return result.getKnownWavelet(index);
- }
- public Builder setKnownWavelet(int index, org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.knownWavelet_.set(index, value);
- return this;
- }
- public Builder setKnownWavelet(int index, org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion.Builder builderForValue) {
- result.knownWavelet_.set(index, builderForValue.build());
- return this;
- }
- public Builder addKnownWavelet(org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.knownWavelet_.isEmpty()) {
- result.knownWavelet_ = new java.util.ArrayList<org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion>();
- }
- result.knownWavelet_.add(value);
- return this;
- }
- public Builder addKnownWavelet(org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion.Builder builderForValue) {
- if (result.knownWavelet_.isEmpty()) {
- result.knownWavelet_ = new java.util.ArrayList<org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion>();
- }
- result.knownWavelet_.add(builderForValue.build());
- return this;
- }
- public Builder addAllKnownWavelet(
- java.lang.Iterable<? extends org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion> values) {
- if (result.knownWavelet_.isEmpty()) {
- result.knownWavelet_ = new java.util.ArrayList<org.waveprotocol.wave.concurrencycontrol.ClientServer.WaveletVersion>();
- }
- super.addAll(values, result.knownWavelet_);
- return this;
- }
- public Builder clearKnownWavelet() {
- result.knownWavelet_ = java.util.Collections.emptyList();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:diff.FetchDiffRequest)
- }
-
- static {
- defaultInstance = new FetchDiffRequest(true);
- org.waveprotocol.wave.diff.Diff.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:diff.FetchDiffRequest)
- }
-
- public static final class FetchDiffResponse extends
- com.google.protobuf.GeneratedMessage {
- // Use FetchDiffResponse.newBuilder() to construct.
- private FetchDiffResponse() {
- initFields();
- }
- private FetchDiffResponse(boolean noInit) {}
-
- private static final FetchDiffResponse defaultInstance;
- public static FetchDiffResponse getDefaultInstance() {
- return defaultInstance;
- }
-
- public FetchDiffResponse getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.waveprotocol.wave.diff.Diff.internal_static_diff_FetchDiffResponse_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.waveprotocol.wave.diff.Diff.internal_static_diff_FetchDiffResponse_fieldAccessorTable;
- }
-
- public static final class WaveletDiff extends
- com.google.protobuf.GeneratedMessage {
- // Use WaveletDiff.newBuilder() to construct.
- private WaveletDiff() {
- initFields();
- }
- private WaveletDiff(boolean noInit) {}
-
- private static final WaveletDiff defaultInstance;
- public static WaveletDiff getDefaultInstance() {
- return defaultInstance;
- }
-
- public WaveletDiff getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.waveprotocol.wave.diff.Diff.internal_static_diff_FetchDiffResponse_WaveletDiff_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.waveprotocol.wave.diff.Diff.internal_static_diff_FetchDiffResponse_WaveletDiff_fieldAccessorTable;
- }
-
- // required string waveletId = 1;
- public static final int WAVELETID_FIELD_NUMBER = 1;
- private boolean hasWaveletId;
- private java.lang.String waveletId_ = "";
- public boolean hasWaveletId() { return hasWaveletId; }
- public java.lang.String getWaveletId() { return waveletId_; }
-
- // optional .diff.WaveletDiffSnapshot snapshot = 2;
- public static final int SNAPSHOT_FIELD_NUMBER = 2;
- private boolean hasSnapshot;
- private org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot snapshot_;
- public boolean hasSnapshot() { return hasSnapshot; }
- public org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot getSnapshot() { return snapshot_; }
-
- private void initFields() {
- snapshot_ = org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.getDefaultInstance();
- }
- public final boolean isInitialized() {
- if (!hasWaveletId) return false;
- if (hasSnapshot()) {
- if (!getSnapshot().isInitialized()) return false;
- }
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (hasWaveletId()) {
- output.writeString(1, getWaveletId());
- }
- if (hasSnapshot()) {
- output.writeMessage(2, getSnapshot());
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasWaveletId()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(1, getWaveletId());
- }
- if (hasSnapshot()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, getSnapshot());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder> {
- private org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff result;
-
- // Construct using org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff();
- return builder;
- }
-
- protected org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff internalGetResult() {
- return result;
- }
-
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff();
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.getDescriptor();
- }
-
- public org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff getDefaultInstanceForType() {
- return org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.getDefaultInstance();
- }
-
- public boolean isInitialized() {
- return result.isInitialized();
- }
- public org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- public org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff returnMe = result;
- result = null;
- return returnMe;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff) {
- return mergeFrom((org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff other) {
- if (other == org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.getDefaultInstance()) return this;
- if (other.hasWaveletId()) {
- setWaveletId(other.getWaveletId());
- }
- if (other.hasSnapshot()) {
- mergeSnapshot(other.getSnapshot());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- return this;
- }
- break;
- }
- case 10: {
- setWaveletId(input.readString());
- break;
- }
- case 18: {
- org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.Builder subBuilder = org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.newBuilder();
- if (hasSnapshot()) {
- subBuilder.mergeFrom(getSnapshot());
- }
- input.readMessage(subBuilder, extensionRegistry);
- setSnapshot(subBuilder.buildPartial());
- break;
- }
- }
- }
- }
-
-
- // required string waveletId = 1;
- public boolean hasWaveletId() {
- return result.hasWaveletId();
- }
- public java.lang.String getWaveletId() {
- return result.getWaveletId();
- }
- public Builder setWaveletId(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasWaveletId = true;
- result.waveletId_ = value;
- return this;
- }
- public Builder clearWaveletId() {
- result.hasWaveletId = false;
- result.waveletId_ = getDefaultInstance().getWaveletId();
- return this;
- }
-
- // optional .diff.WaveletDiffSnapshot snapshot = 2;
- public boolean hasSnapshot() {
- return result.hasSnapshot();
- }
- public org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot getSnapshot() {
- return result.getSnapshot();
- }
- public Builder setSnapshot(org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasSnapshot = true;
- result.snapshot_ = value;
- return this;
- }
- public Builder setSnapshot(org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.Builder builderForValue) {
- result.hasSnapshot = true;
- result.snapshot_ = builderForValue.build();
- return this;
- }
- public Builder mergeSnapshot(org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot value) {
- if (result.hasSnapshot() &&
- result.snapshot_ != org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.getDefaultInstance()) {
- result.snapshot_ =
- org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.newBuilder(result.snapshot_).mergeFrom(value).buildPartial();
- } else {
- result.snapshot_ = value;
- }
- result.hasSnapshot = true;
- return this;
- }
- public Builder clearSnapshot() {
- result.hasSnapshot = false;
- result.snapshot_ = org.waveprotocol.wave.diff.Diff.WaveletDiffSnapshot.getDefaultInstance();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:diff.FetchDiffResponse.WaveletDiff)
- }
-
- static {
- defaultInstance = new WaveletDiff(true);
- org.waveprotocol.wave.diff.Diff.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:diff.FetchDiffResponse.WaveletDiff)
- }
-
- // required .concurrencycontrol.ResponseStatus status = 1;
- public static final int STATUS_FIELD_NUMBER = 1;
- private boolean hasStatus;
- private org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus status_;
- public boolean hasStatus() { return hasStatus; }
- public org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus getStatus() { return status_; }
-
- // repeated .diff.FetchDiffResponse.WaveletDiff wavelet = 2;
- public static final int WAVELET_FIELD_NUMBER = 2;
- private java.util.List<org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff> wavelet_ =
- java.util.Collections.emptyList();
- public java.util.List<org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff> getWaveletList() {
- return wavelet_;
- }
- public int getWaveletCount() { return wavelet_.size(); }
- public org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff getWavelet(int index) {
- return wavelet_.get(index);
- }
-
- private void initFields() {
- status_ = org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus.getDefaultInstance();
- }
- public final boolean isInitialized() {
- if (!hasStatus) return false;
- if (!getStatus().isInitialized()) return false;
- for (org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff element : getWaveletList()) {
- if (!element.isInitialized()) return false;
- }
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (hasStatus()) {
- output.writeMessage(1, getStatus());
- }
- for (org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff element : getWaveletList()) {
- output.writeMessage(2, element);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasStatus()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, getStatus());
- }
- for (org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff element : getWaveletList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, element);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static org.waveprotocol.wave.diff.Diff.FetchDiffResponse parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(org.waveprotocol.wave.diff.Diff.FetchDiffResponse prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder> {
- private org.waveprotocol.wave.diff.Diff.FetchDiffResponse result;
-
- // Construct using org.waveprotocol.wave.diff.Diff.FetchDiffResponse.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new org.waveprotocol.wave.diff.Diff.FetchDiffResponse();
- return builder;
- }
-
- protected org.waveprotocol.wave.diff.Diff.FetchDiffResponse internalGetResult() {
- return result;
- }
-
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new org.waveprotocol.wave.diff.Diff.FetchDiffResponse();
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return org.waveprotocol.wave.diff.Diff.FetchDiffResponse.getDescriptor();
- }
-
- public org.waveprotocol.wave.diff.Diff.FetchDiffResponse getDefaultInstanceForType() {
- return org.waveprotocol.wave.diff.Diff.FetchDiffResponse.getDefaultInstance();
- }
-
- public boolean isInitialized() {
- return result.isInitialized();
- }
- public org.waveprotocol.wave.diff.Diff.FetchDiffResponse build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private org.waveprotocol.wave.diff.Diff.FetchDiffResponse buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- public org.waveprotocol.wave.diff.Diff.FetchDiffResponse buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- if (result.wavelet_ != java.util.Collections.EMPTY_LIST) {
- result.wavelet_ =
- java.util.Collections.unmodifiableList(result.wavelet_);
- }
- org.waveprotocol.wave.diff.Diff.FetchDiffResponse returnMe = result;
- result = null;
- return returnMe;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof org.waveprotocol.wave.diff.Diff.FetchDiffResponse) {
- return mergeFrom((org.waveprotocol.wave.diff.Diff.FetchDiffResponse)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(org.waveprotocol.wave.diff.Diff.FetchDiffResponse other) {
- if (other == org.waveprotocol.wave.diff.Diff.FetchDiffResponse.getDefaultInstance()) return this;
- if (other.hasStatus()) {
- mergeStatus(other.getStatus());
- }
- if (!other.wavelet_.isEmpty()) {
- if (result.wavelet_.isEmpty()) {
- result.wavelet_ = new java.util.ArrayList<org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff>();
- }
- result.wavelet_.addAll(other.wavelet_);
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- return this;
- }
- break;
- }
- case 10: {
- org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus.Builder subBuilder = org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus.newBuilder();
- if (hasStatus()) {
- subBuilder.mergeFrom(getStatus());
- }
- input.readMessage(subBuilder, extensionRegistry);
- setStatus(subBuilder.buildPartial());
- break;
- }
- case 18: {
- org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.Builder subBuilder = org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addWavelet(subBuilder.buildPartial());
- break;
- }
- }
- }
- }
-
-
- // required .concurrencycontrol.ResponseStatus status = 1;
- public boolean hasStatus() {
- return result.hasStatus();
- }
- public org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus getStatus() {
- return result.getStatus();
- }
- public Builder setStatus(org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasStatus = true;
- result.status_ = value;
- return this;
- }
- public Builder setStatus(org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus.Builder builderForValue) {
- result.hasStatus = true;
- result.status_ = builderForValue.build();
- return this;
- }
- public Builder mergeStatus(org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus value) {
- if (result.hasStatus() &&
- result.status_ != org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus.getDefaultInstance()) {
- result.status_ =
- org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus.newBuilder(result.status_).mergeFrom(value).buildPartial();
- } else {
- result.status_ = value;
- }
- result.hasStatus = true;
- return this;
- }
- public Builder clearStatus() {
- result.hasStatus = false;
- result.status_ = org.waveprotocol.wave.concurrencycontrol.ClientServer.ResponseStatus.getDefaultInstance();
- return this;
- }
-
- // repeated .diff.FetchDiffResponse.WaveletDiff wavelet = 2;
- public java.util.List<org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff> getWaveletList() {
- return java.util.Collections.unmodifiableList(result.wavelet_);
- }
- public int getWaveletCount() {
- return result.getWaveletCount();
- }
- public org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff getWavelet(int index) {
- return result.getWavelet(index);
- }
- public Builder setWavelet(int index, org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.wavelet_.set(index, value);
- return this;
- }
- public Builder setWavelet(int index, org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.Builder builderForValue) {
- result.wavelet_.set(index, builderForValue.build());
- return this;
- }
- public Builder addWavelet(org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.wavelet_.isEmpty()) {
- result.wavelet_ = new java.util.ArrayList<org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff>();
- }
- result.wavelet_.add(value);
- return this;
- }
- public Builder addWavelet(org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff.Builder builderForValue) {
- if (result.wavelet_.isEmpty()) {
- result.wavelet_ = new java.util.ArrayList<org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff>();
- }
- result.wavelet_.add(builderForValue.build());
- return this;
- }
- public Builder addAllWavelet(
- java.lang.Iterable<? extends org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff> values) {
- if (result.wavelet_.isEmpty()) {
- result.wavelet_ = new java.util.ArrayList<org.waveprotocol.wave.diff.Diff.FetchDiffResponse.WaveletDiff>();
- }
- super.addAll(values, result.wavelet_);
- return this;
- }
- public Builder clearWavelet() {
- result.wavelet_ = java.util.Collections.emptyList();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:diff.FetchDiffResponse)
- }
-
- static {
- defaultInstance = new FetchDiffResponse(true);
- org.waveprotocol.wave.diff.Diff.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:diff.FetchDiffResponse)
- }
-
- public static final class WaveletDiffSnapshot extends
- com.google.protobuf.GeneratedMessage {
- // Use WaveletDiffSnapshot.newBuilder() to construct.
- private WaveletDiffSnapshot() {
- initFields();
- }
- private WaveletDiffSnapshot(boolean noInit) {}
-
- private static final WaveletDiffSnapshot defaultInstance;
- public static WaveletDiffSnapshot getDefaultInstance() {
- return defaultInstance;
- }
-
- public WaveletDiffSnapshot getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return org.waveprotocol.wave.diff.Diff.internal_static_diff_WaveletDiffSnapshot_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return org.waveprotocol.wave.diff.Diff.internal_static_diff_WaveletDiffSnapshot_fieldAccessorTable;
- }
-
- // required string waveletId = 1;
- public static final int WAVELETID_FIELD_NUMBER = 1;
- private boolean hasWaveletId;
- private java.lang.String waveletId_ = "";
- public boolean hasWaveletId() { return hasWaveletId; }
- public java.lang.String getWaveletId() { return waveletId_; }
-
- // repeated string participant = 2;
- public static final int PARTICIPANT_FIELD_NUMBER = 2;
- private java.util.List<java.lang.String> participant_ =
- java.util.Collections.emptyList();
- public java.util.List<java.lang.String> getParticipantList() {
- return participant_;
- }
- public int getParticipantCount() { return participant_.size(); }
- public java.lang.String getParticipant(int index) {
- return participant_.get(index);
- }
-
- // repeated string addedParticipant = 21;
- public static final int ADDEDPARTICIPANT_FIELD_NUMBER = 21;
- private java.util.List<java.lang.String> addedParticipant_ =
- java.util.Collections.emptyList();
- public java.util.List<java.lang.String> getAddedParticipantList() {
- return addedParticipant_;
- }
- public int getAddedParticipantCount() { return addedParticipant_.size(); }
- public java.lang.String getAddedParticipant(int index) {
- return addedParticipant_.get(index);
- }
-
- // repeated string removedParticipant = 22;
- public static final int REMOVEDPARTICIPANT_FIELD_NUMBER = 22;
- private java.util.List<java.lang.String> removedParticipant_ =
- java.util.Collections.emptyList();
- public java.util.List<java.lang.String> getRemovedParticipantList() {
- return removedParticipant_;
- }
- public int getRemovedParticipantCount() { return removedParticipant_.size(); }
- public java.lang.String getRemovedParticipant(int index) {
- return removedParticipant_.get(index);
- }
-
- // repeated .diff.DocumentDiffSnapshot document = 3;
- public static final int DOCUMENT_FIELD_NUMBER = 3;
- private java.util.List<org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot> document_ =
- java.util.Collections.emptyList();
- public java.util.List<org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot> getDocumentList() {
- return document_;
- }
- public int getDocumentCount() { return document_.size(); }
- public org.waveprotocol.wave.diff.Diff.DocumentDiffSnapshot getDocument(int index) {
- return document_.get(index);
- }
-
- // required .federation.ProtocolHashedVersion version = 4;
- public static final int VERSION_FIELD_NUMBER = 4;
- private boolean hasVersion;
- private org.waveprotocol.wave.federation.Proto.ProtocolHashedVersion version_;
- public boolean hasVersion() { return hasVersion; }
- public org.waveprotocol.wave.federation.Proto.ProtocolHashedVersion getVersion() { return version_; }
-
- // required int64 lastModifiedTime = 5;
- public static final int LASTMODIFIEDTIME_FIELD_NUM…
Large files files are truncated, but you can click here to view the full file