http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/7d8609e7/proto_src/org/waveprotocol/wave/federation/FederationErrorProto.java
----------------------------------------------------------------------
diff --git
a/proto_src/org/waveprotocol/wave/federation/FederationErrorProto.java
b/proto_src/org/waveprotocol/wave/federation/FederationErrorProto.java
deleted file mode 100644
index 5b96a18..0000000
--- a/proto_src/org/waveprotocol/wave/federation/FederationErrorProto.java
+++ /dev/null
@@ -1,914 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: org/waveprotocol/wave/federation/federation_error.protodevel
-
-package org.waveprotocol.wave.federation;
-
-public final class FederationErrorProto {
- private FederationErrorProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- }
- public interface FederationErrorOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // required .federation.FederationError.Code error_code = 1;
- /**
- * <code>required .federation.FederationError.Code error_code = 1;</code>
- */
- boolean hasErrorCode();
- /**
- * <code>required .federation.FederationError.Code error_code = 1;</code>
- */
- org.waveprotocol.wave.federation.FederationErrorProto.FederationError.Code
getErrorCode();
-
- // optional string error_message = 2;
- /**
- * <code>optional string error_message = 2;</code>
- */
- boolean hasErrorMessage();
- /**
- * <code>optional string error_message = 2;</code>
- */
- java.lang.String getErrorMessage();
- /**
- * <code>optional string error_message = 2;</code>
- */
- com.google.protobuf.ByteString
- getErrorMessageBytes();
- }
- /**
- * Protobuf type {@code federation.FederationError}
- *
- * <pre>
- **
- * Container for a Federation error, containing the error code (as per the
- * specification) and an optional description for debugging etc.
- *
- * The internal enum has codes which must map directly to XMPP error stanzas,
- * as defined in RFC 3920 (9.3.3).
- *
- * TODO(arb): Once the error codes have been audited and standardised, merge
into federation.proto.
- * </pre>
- */
- public static final class FederationError extends
- com.google.protobuf.GeneratedMessage
- implements FederationErrorOrBuilder {
- // Use FederationError.newBuilder() to construct.
- private FederationError(com.google.protobuf.GeneratedMessage.Builder<?>
builder) {
- super(builder);
- this.unknownFields = builder.getUnknownFields();
- }
- private FederationError(boolean noInit) { this.unknownFields =
com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
-
- private static final FederationError defaultInstance;
- public static FederationError getDefaultInstance() {
- return defaultInstance;
- }
-
- public FederationError getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- private final com.google.protobuf.UnknownFieldSet unknownFields;
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private FederationError(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- initFields();
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- case 8: {
- int rawValue = input.readEnum();
-
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.Code
value =
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.Code.valueOf(rawValue);
- if (value == null) {
- unknownFields.mergeVarintField(1, rawValue);
- } else {
- bitField0_ |= 0x00000001;
- errorCode_ = value;
- }
- break;
- }
- case 18: {
- bitField0_ |= 0x00000002;
- errorMessage_ = input.readBytes();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return
org.waveprotocol.wave.federation.FederationErrorProto.internal_static_federation_FederationError_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return
org.waveprotocol.wave.federation.FederationErrorProto.internal_static_federation_FederationError_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
-
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.class,
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.Builder.class);
- }
-
- public static com.google.protobuf.Parser<FederationError> PARSER =
- new com.google.protobuf.AbstractParser<FederationError>() {
- public FederationError parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new FederationError(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<FederationError> getParserForType() {
- return PARSER;
- }
-
- /**
- * Protobuf enum {@code federation.FederationError.Code}
- */
- public enum Code
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- * <code>OK = 0;</code>
- *
- * <pre>
- * Should only be used for internal success.
- * </pre>
- */
- OK(0, 0),
- /**
- * <code>BAD_REQUEST = 1;</code>
- *
- * <pre>
- * Response for a completely broken request.
- * </pre>
- */
- BAD_REQUEST(1, 1),
- /**
- * <code>ITEM_NOT_FOUND = 2;</code>
- *
- * <pre>
- * Either the wavelet does not exist, or the request is not authorised
and
- * thus should not reveal the existence of the target wavelet.
- * </pre>
- */
- ITEM_NOT_FOUND(2, 2),
- /**
- * <code>NOT_ACCEPTABLE = 3;</code>
- *
- * <pre>
- * Revealable error conditions; including, but not limited to:
- * + submit failed due to invalid delta
- * + invalid signer info post
- * </pre>
- */
- NOT_ACCEPTABLE(3, 3),
- /**
- * <code>NOT_AUTHORIZED = 4;</code>
- *
- * <pre>
- * Signer info not available for delta submit.
- * </pre>
- */
- NOT_AUTHORIZED(4, 4),
- /**
- * <code>RESOURCE_CONSTRAINT = 5;</code>
- *
- * <pre>
- * Generic 'back-off' message.
- * </pre>
- */
- RESOURCE_CONSTRAINT(5, 5),
- /**
- * <code>UNDEFINED_CONDITION = 6;</code>
- *
- * <pre>
- * Undefined condition. This error will be generated if an error
condition
- * not otherwise contained within this protobuf is received
over-the-wire.
- * </pre>
- */
- UNDEFINED_CONDITION(6, 6),
- /**
- * <code>REMOTE_SERVER_TIMEOUT = 7;</code>
- *
- * <pre>
- * Timeout error condition. Note that this may be generated internally
- * as well as being valid on-the-wire.
- * </pre>
- */
- REMOTE_SERVER_TIMEOUT(7, 7),
- /**
- * <code>UNEXPECTED_REQUEST = 8;</code>
- *
- * <pre>
- * Request unexpected, wait requested. Note that this may be generated
- * internally, notably if an in-flight ID is re-used.
- * </pre>
- */
- UNEXPECTED_REQUEST(8, 8),
- /**
- * <code>INTERNAL_SERVER_ERROR = 9;</code>
- *
- * <pre>
- * Internal server error, wait requested.
- * </pre>
- */
- INTERNAL_SERVER_ERROR(9, 9),
- ;
-
- /**
- * <code>OK = 0;</code>
- *
- * <pre>
- * Should only be used for internal success.
- * </pre>
- */
- public static final int OK_VALUE = 0;
- /**
- * <code>BAD_REQUEST = 1;</code>
- *
- * <pre>
- * Response for a completely broken request.
- * </pre>
- */
- public static final int BAD_REQUEST_VALUE = 1;
- /**
- * <code>ITEM_NOT_FOUND = 2;</code>
- *
- * <pre>
- * Either the wavelet does not exist, or the request is not authorised
and
- * thus should not reveal the existence of the target wavelet.
- * </pre>
- */
- public static final int ITEM_NOT_FOUND_VALUE = 2;
- /**
- * <code>NOT_ACCEPTABLE = 3;</code>
- *
- * <pre>
- * Revealable error conditions; including, but not limited to:
- * + submit failed due to invalid delta
- * + invalid signer info post
- * </pre>
- */
- public static final int NOT_ACCEPTABLE_VALUE = 3;
- /**
- * <code>NOT_AUTHORIZED = 4;</code>
- *
- * <pre>
- * Signer info not available for delta submit.
- * </pre>
- */
- public static final int NOT_AUTHORIZED_VALUE = 4;
- /**
- * <code>RESOURCE_CONSTRAINT = 5;</code>
- *
- * <pre>
- * Generic 'back-off' message.
- * </pre>
- */
- public static final int RESOURCE_CONSTRAINT_VALUE = 5;
- /**
- * <code>UNDEFINED_CONDITION = 6;</code>
- *
- * <pre>
- * Undefined condition. This error will be generated if an error
condition
- * not otherwise contained within this protobuf is received
over-the-wire.
- * </pre>
- */
- public static final int UNDEFINED_CONDITION_VALUE = 6;
- /**
- * <code>REMOTE_SERVER_TIMEOUT = 7;</code>
- *
- * <pre>
- * Timeout error condition. Note that this may be generated internally
- * as well as being valid on-the-wire.
- * </pre>
- */
- public static final int REMOTE_SERVER_TIMEOUT_VALUE = 7;
- /**
- * <code>UNEXPECTED_REQUEST = 8;</code>
- *
- * <pre>
- * Request unexpected, wait requested. Note that this may be generated
- * internally, notably if an in-flight ID is re-used.
- * </pre>
- */
- public static final int UNEXPECTED_REQUEST_VALUE = 8;
- /**
- * <code>INTERNAL_SERVER_ERROR = 9;</code>
- *
- * <pre>
- * Internal server error, wait requested.
- * </pre>
- */
- public static final int INTERNAL_SERVER_ERROR_VALUE = 9;
-
-
- public final int getNumber() { return value; }
-
- public static Code valueOf(int value) {
- switch (value) {
- case 0: return OK;
- case 1: return BAD_REQUEST;
- case 2: return ITEM_NOT_FOUND;
- case 3: return NOT_ACCEPTABLE;
- case 4: return NOT_AUTHORIZED;
- case 5: return RESOURCE_CONSTRAINT;
- case 6: return UNDEFINED_CONDITION;
- case 7: return REMOTE_SERVER_TIMEOUT;
- case 8: return UNEXPECTED_REQUEST;
- case 9: return INTERNAL_SERVER_ERROR;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap<Code>
- internalGetValueMap() {
- return internalValueMap;
- }
- private static com.google.protobuf.Internal.EnumLiteMap<Code>
- internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap<Code>() {
- public Code findValueByNumber(int number) {
- return Code.valueOf(number);
- }
- };
-
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(index);
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final Code[] VALUES = values();
-
- public static Code valueOf(
- com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
- if (desc.getType() != getDescriptor()) {
- throw new java.lang.IllegalArgumentException(
- "EnumValueDescriptor is not for this type.");
- }
- return VALUES[desc.getIndex()];
- }
-
- private final int index;
- private final int value;
-
- private Code(int index, int value) {
- this.index = index;
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:federation.FederationError.Code)
- }
-
- private int bitField0_;
- // required .federation.FederationError.Code error_code = 1;
- public static final int ERROR_CODE_FIELD_NUMBER = 1;
- private
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.Code
errorCode_;
- /**
- * <code>required .federation.FederationError.Code error_code = 1;</code>
- */
- public boolean hasErrorCode() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * <code>required .federation.FederationError.Code error_code = 1;</code>
- */
- public
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.Code
getErrorCode() {
- return errorCode_;
- }
-
- // optional string error_message = 2;
- public static final int ERROR_MESSAGE_FIELD_NUMBER = 2;
- private java.lang.Object errorMessage_;
- /**
- * <code>optional string error_message = 2;</code>
- */
- public boolean hasErrorMessage() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * <code>optional string error_message = 2;</code>
- */
- public java.lang.String getErrorMessage() {
- java.lang.Object ref = errorMessage_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- errorMessage_ = s;
- }
- return s;
- }
- }
- /**
- * <code>optional string error_message = 2;</code>
- */
- public com.google.protobuf.ByteString
- getErrorMessageBytes() {
- java.lang.Object ref = errorMessage_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- errorMessage_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private void initFields() {
- errorCode_ =
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.Code.OK;
- errorMessage_ = "";
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- if (!hasErrorCode()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeEnum(1, errorCode_.getNumber());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(2, getErrorMessageBytes());
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(1, errorCode_.getNumber());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, getErrorMessageBytes());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
- }
-
- public static
org.waveprotocol.wave.federation.FederationErrorProto.FederationError parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static
org.waveprotocol.wave.federation.FederationErrorProto.FederationError parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static
org.waveprotocol.wave.federation.FederationErrorProto.FederationError
parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static
org.waveprotocol.wave.federation.FederationErrorProto.FederationError parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static
org.waveprotocol.wave.federation.FederationErrorProto.FederationError
parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static
org.waveprotocol.wave.federation.FederationErrorProto.FederationError parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
- public static
org.waveprotocol.wave.federation.FederationErrorProto.FederationError
parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input);
- }
- public static
org.waveprotocol.wave.federation.FederationErrorProto.FederationError
parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseDelimitedFrom(input, extensionRegistry);
- }
- public static
org.waveprotocol.wave.federation.FederationErrorProto.FederationError parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return PARSER.parseFrom(input);
- }
- public static
org.waveprotocol.wave.federation.FederationErrorProto.FederationError parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return PARSER.parseFrom(input, extensionRegistry);
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder
newBuilder(org.waveprotocol.wave.federation.FederationErrorProto.FederationError
prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() { return newBuilder(this); }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code federation.FederationError}
- *
- * <pre>
- **
- * Container for a Federation error, containing the error code (as per the
- * specification) and an optional description for debugging etc.
- *
- * The internal enum has codes which must map directly to XMPP error
stanzas,
- * as defined in RFC 3920 (9.3.3).
- *
- * TODO(arb): Once the error codes have been audited and standardised,
merge into federation.proto.
- * </pre>
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder>
- implements
org.waveprotocol.wave.federation.FederationErrorProto.FederationErrorOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return
org.waveprotocol.wave.federation.FederationErrorProto.internal_static_federation_FederationError_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return
org.waveprotocol.wave.federation.FederationErrorProto.internal_static_federation_FederationError_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
-
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.class,
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.Builder.class);
- }
-
- // Construct using
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
- }
- }
- private static Builder create() {
- return new Builder();
- }
-
- public Builder clear() {
- super.clear();
- errorCode_ =
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.Code.OK;
- bitField0_ = (bitField0_ & ~0x00000001);
- errorMessage_ = "";
- bitField0_ = (bitField0_ & ~0x00000002);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return
org.waveprotocol.wave.federation.FederationErrorProto.internal_static_federation_FederationError_descriptor;
- }
-
- public
org.waveprotocol.wave.federation.FederationErrorProto.FederationError
getDefaultInstanceForType() {
- return
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.getDefaultInstance();
- }
-
- public
org.waveprotocol.wave.federation.FederationErrorProto.FederationError build() {
- org.waveprotocol.wave.federation.FederationErrorProto.FederationError
result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public
org.waveprotocol.wave.federation.FederationErrorProto.FederationError
buildPartial() {
- org.waveprotocol.wave.federation.FederationErrorProto.FederationError
result = new
org.waveprotocol.wave.federation.FederationErrorProto.FederationError(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.errorCode_ = errorCode_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
- result.errorMessage_ = errorMessage_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof
org.waveprotocol.wave.federation.FederationErrorProto.FederationError) {
- return
mergeFrom((org.waveprotocol.wave.federation.FederationErrorProto.FederationError)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder
mergeFrom(org.waveprotocol.wave.federation.FederationErrorProto.FederationError
other) {
- if (other ==
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.getDefaultInstance())
return this;
- if (other.hasErrorCode()) {
- setErrorCode(other.getErrorCode());
- }
- if (other.hasErrorMessage()) {
- bitField0_ |= 0x00000002;
- errorMessage_ = other.errorMessage_;
- onChanged();
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- public final boolean isInitialized() {
- if (!hasErrorCode()) {
-
- return false;
- }
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- org.waveprotocol.wave.federation.FederationErrorProto.FederationError
parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
(org.waveprotocol.wave.federation.FederationErrorProto.FederationError)
e.getUnfinishedMessage();
- throw e;
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- // required .federation.FederationError.Code error_code = 1;
- private
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.Code
errorCode_ =
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.Code.OK;
- /**
- * <code>required .federation.FederationError.Code error_code = 1;</code>
- */
- public boolean hasErrorCode() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- /**
- * <code>required .federation.FederationError.Code error_code = 1;</code>
- */
- public
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.Code
getErrorCode() {
- return errorCode_;
- }
- /**
- * <code>required .federation.FederationError.Code error_code = 1;</code>
- */
- public Builder
setErrorCode(org.waveprotocol.wave.federation.FederationErrorProto.FederationError.Code
value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- errorCode_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>required .federation.FederationError.Code error_code = 1;</code>
- */
- public Builder clearErrorCode() {
- bitField0_ = (bitField0_ & ~0x00000001);
- errorCode_ =
org.waveprotocol.wave.federation.FederationErrorProto.FederationError.Code.OK;
- onChanged();
- return this;
- }
-
- // optional string error_message = 2;
- private java.lang.Object errorMessage_ = "";
- /**
- * <code>optional string error_message = 2;</code>
- */
- public boolean hasErrorMessage() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- /**
- * <code>optional string error_message = 2;</code>
- */
- public java.lang.String getErrorMessage() {
- java.lang.Object ref = errorMessage_;
- if (!(ref instanceof java.lang.String)) {
- java.lang.String s = ((com.google.protobuf.ByteString) ref)
- .toStringUtf8();
- errorMessage_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>optional string error_message = 2;</code>
- */
- public com.google.protobuf.ByteString
- getErrorMessageBytes() {
- java.lang.Object ref = errorMessage_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- errorMessage_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>optional string error_message = 2;</code>
- */
- public Builder setErrorMessage(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- errorMessage_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>optional string error_message = 2;</code>
- */
- public Builder clearErrorMessage() {
- bitField0_ = (bitField0_ & ~0x00000002);
- errorMessage_ = getDefaultInstance().getErrorMessage();
- onChanged();
- return this;
- }
- /**
- * <code>optional string error_message = 2;</code>
- */
- public Builder setErrorMessageBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- errorMessage_ = value;
- onChanged();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:federation.FederationError)
- }
-
- static {
- defaultInstance = new FederationError(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:federation.FederationError)
- }
-
- private static com.google.protobuf.Descriptors.Descriptor
- internal_static_federation_FederationError_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internal_static_federation_FederationError_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n<org/waveprotocol/wave/federation/feder" +
- "ation_error.protodevel\022\nfederation\"\274\002\n\017F" +
- "ederationError\0224\n\nerror_code\030\001 \002(\0162 .fed" +
- "eration.FederationError.Code\022\025\n\rerror_me" +
- "ssage\030\002
\001(\t\"\333\001\n\004Code\022\006\n\002OK\020\000\022\017\n\013BAD_REQU" +
-
"EST\020\001\022\022\n\016ITEM_NOT_FOUND\020\002\022\022\n\016NOT_ACCEPTA" +
-
"BLE\020\003\022\022\n\016NOT_AUTHORIZED\020\004\022\027\n\023RESOURCE_CO" +
-
"NSTRAINT\020\005\022\027\n\023UNDEFINED_CONDITION\020\006\022\031\n\025R" +
- "EMOTE_SERVER_TIMEOUT\020\007\022\026\n\022UNEXPECTED_REQ" +
- "UEST\020\010\022\031\n\025INTERNAL_SERVER_ERROR\020\tB8\n org",
- ".waveprotocol.wave.federationB\024Federatio" +
- "nErrorProto"
- };
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner
assigner =
- new
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- internal_static_federation_FederationError_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_federation_FederationError_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_federation_FederationError_descriptor,
- new java.lang.String[] { "ErrorCode", "ErrorMessage", });
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- }, assigner);
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}