// Generated by the protocol buffer compiler. DO NOT EDIT! // source: rpc.proto package muduo.rpc.proto; public final class RpcProto { private RpcProto() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } public enum MessageType implements com.google.protobuf.ProtocolMessageEnum { REQUEST(0, 1), RESPONSE(1, 2), ERROR(2, 3), ; public static final int REQUEST_VALUE = 1; public static final int RESPONSE_VALUE = 2; public static final int ERROR_VALUE = 3; public final int getNumber() { return value; } public static MessageType valueOf(int value) { switch (value) { case 1: return REQUEST; case 2: return RESPONSE; case 3: return ERROR; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public MessageType findValueByNumber(int number) { return MessageType.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 muduo.rpc.proto.RpcProto.getDescriptor().getEnumTypes().get(0); } private static final MessageType[] VALUES = { REQUEST, RESPONSE, ERROR, }; public static MessageType 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 MessageType(int index, int value) { this.index = index; this.value = value; } // @@protoc_insertion_point(enum_scope:MessageType) } public enum ErrorCode implements com.google.protobuf.ProtocolMessageEnum { WRONG_PROTO(0, 1), NO_SERVICE(1, 2), NO_METHOD(2, 3), INVALID_REQUEST(3, 4), INVALID_RESPONSE(4, 5), ; public static final int WRONG_PROTO_VALUE = 1; public static final int NO_SERVICE_VALUE = 2; public static final int NO_METHOD_VALUE = 3; public static final int INVALID_REQUEST_VALUE = 4; public static final int INVALID_RESPONSE_VALUE = 5; public final int getNumber() { return value; } public static ErrorCode valueOf(int value) { switch (value) { case 1: return WRONG_PROTO; case 2: return NO_SERVICE; case 3: return NO_METHOD; case 4: return INVALID_REQUEST; case 5: return INVALID_RESPONSE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public ErrorCode findValueByNumber(int number) { return ErrorCode.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 muduo.rpc.proto.RpcProto.getDescriptor().getEnumTypes().get(1); } private static final ErrorCode[] VALUES = { WRONG_PROTO, NO_SERVICE, NO_METHOD, INVALID_REQUEST, INVALID_RESPONSE, }; public static ErrorCode 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 ErrorCode(int index, int value) { this.index = index; this.value = value; } // @@protoc_insertion_point(enum_scope:ErrorCode) } public interface RpcMessageOrBuilder extends com.google.protobuf.MessageOrBuilder { // required .MessageType type = 1; boolean hasType(); muduo.rpc.proto.RpcProto.MessageType getType(); // required fixed64 id = 2; boolean hasId(); long getId(); // optional string service = 3; boolean hasService(); String getService(); // optional string method = 4; boolean hasMethod(); String getMethod(); // optional bytes request = 5; boolean hasRequest(); com.google.protobuf.ByteString getRequest(); // optional bytes response = 6; boolean hasResponse(); com.google.protobuf.ByteString getResponse(); // optional .ErrorCode error = 7; boolean hasError(); muduo.rpc.proto.RpcProto.ErrorCode getError(); } public static final class RpcMessage extends com.google.protobuf.GeneratedMessage implements RpcMessageOrBuilder { // Use RpcMessage.newBuilder() to construct. private RpcMessage(Builder builder) { super(builder); } private RpcMessage(boolean noInit) {} private static final RpcMessage defaultInstance; public static RpcMessage getDefaultInstance() { return defaultInstance; } public RpcMessage getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return muduo.rpc.proto.RpcProto.internal_static_RpcMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return muduo.rpc.proto.RpcProto.internal_static_RpcMessage_fieldAccessorTable; } private int bitField0_; // required .MessageType type = 1; public static final int TYPE_FIELD_NUMBER = 1; private muduo.rpc.proto.RpcProto.MessageType type_; public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } public muduo.rpc.proto.RpcProto.MessageType getType() { return type_; } // required fixed64 id = 2; public static final int ID_FIELD_NUMBER = 2; private long id_; public boolean hasId() { return ((bitField0_ & 0x00000002) == 0x00000002); } public long getId() { return id_; } // optional string service = 3; public static final int SERVICE_FIELD_NUMBER = 3; private Object service_; public boolean hasService() { return ((bitField0_ & 0x00000004) == 0x00000004); } public String getService() { Object ref = service_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { service_ = s; } return s; } } private com.google.protobuf.ByteString getServiceBytes() { Object ref = service_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); service_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } // optional string method = 4; public static final int METHOD_FIELD_NUMBER = 4; private Object method_; public boolean hasMethod() { return ((bitField0_ & 0x00000008) == 0x00000008); } public String getMethod() { Object ref = method_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { method_ = s; } return s; } } private com.google.protobuf.ByteString getMethodBytes() { Object ref = method_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); method_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } // optional bytes request = 5; public static final int REQUEST_FIELD_NUMBER = 5; private com.google.protobuf.ByteString request_; public boolean hasRequest() { return ((bitField0_ & 0x00000010) == 0x00000010); } public com.google.protobuf.ByteString getRequest() { return request_; } // optional bytes response = 6; public static final int RESPONSE_FIELD_NUMBER = 6; private com.google.protobuf.ByteString response_; public boolean hasResponse() { return ((bitField0_ & 0x00000020) == 0x00000020); } public com.google.protobuf.ByteString getResponse() { return response_; } // optional .ErrorCode error = 7; public static final int ERROR_FIELD_NUMBER = 7; private muduo.rpc.proto.RpcProto.ErrorCode error_; public boolean hasError() { return ((bitField0_ & 0x00000040) == 0x00000040); } public muduo.rpc.proto.RpcProto.ErrorCode getError() { return error_; } private void initFields() { type_ = muduo.rpc.proto.RpcProto.MessageType.REQUEST; id_ = 0L; service_ = ""; method_ = ""; request_ = com.google.protobuf.ByteString.EMPTY; response_ = com.google.protobuf.ByteString.EMPTY; error_ = muduo.rpc.proto.RpcProto.ErrorCode.WRONG_PROTO; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasType()) { memoizedIsInitialized = 0; return false; } if (!hasId()) { 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, type_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeFixed64(2, id_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getServiceBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(4, getMethodBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(5, request_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeBytes(6, response_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeEnum(7, error_.getNumber()); } 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, type_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeFixed64Size(2, id_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getServiceBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, getMethodBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, request_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(6, response_); } if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(7, error_.getNumber()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } @java.lang.Override protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static muduo.rpc.proto.RpcProto.RpcMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static muduo.rpc.proto.RpcProto.RpcMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static muduo.rpc.proto.RpcProto.RpcMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static muduo.rpc.proto.RpcProto.RpcMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static muduo.rpc.proto.RpcProto.RpcMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static muduo.rpc.proto.RpcProto.RpcMessage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static muduo.rpc.proto.RpcProto.RpcMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { return builder.buildParsed(); } else { return null; } } public static muduo.rpc.proto.RpcProto.RpcMessage 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 muduo.rpc.proto.RpcProto.RpcMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static muduo.rpc.proto.RpcProto.RpcMessage 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(muduo.rpc.proto.RpcProto.RpcMessage 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; } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements muduo.rpc.proto.RpcProto.RpcMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return muduo.rpc.proto.RpcProto.internal_static_RpcMessage_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return muduo.rpc.proto.RpcProto.internal_static_RpcMessage_fieldAccessorTable; } // Construct using muduo.rpc.proto.RpcProto.RpcMessage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(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(); type_ = muduo.rpc.proto.RpcProto.MessageType.REQUEST; bitField0_ = (bitField0_ & ~0x00000001); id_ = 0L; bitField0_ = (bitField0_ & ~0x00000002); service_ = ""; bitField0_ = (bitField0_ & ~0x00000004); method_ = ""; bitField0_ = (bitField0_ & ~0x00000008); request_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); response_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000020); error_ = muduo.rpc.proto.RpcProto.ErrorCode.WRONG_PROTO; bitField0_ = (bitField0_ & ~0x00000040); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return muduo.rpc.proto.RpcProto.RpcMessage.getDescriptor(); } public muduo.rpc.proto.RpcProto.RpcMessage getDefaultInstanceForType() { return muduo.rpc.proto.RpcProto.RpcMessage.getDefaultInstance(); } public muduo.rpc.proto.RpcProto.RpcMessage build() { muduo.rpc.proto.RpcProto.RpcMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } private muduo.rpc.proto.RpcProto.RpcMessage buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { muduo.rpc.proto.RpcProto.RpcMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } return result; } public muduo.rpc.proto.RpcProto.RpcMessage buildPartial() { muduo.rpc.proto.RpcProto.RpcMessage result = new muduo.rpc.proto.RpcProto.RpcMessage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.type_ = type_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.id_ = id_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.service_ = service_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.method_ = method_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.request_ = request_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000020; } result.response_ = response_; if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000040; } result.error_ = error_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof muduo.rpc.proto.RpcProto.RpcMessage) { return mergeFrom((muduo.rpc.proto.RpcProto.RpcMessage)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(muduo.rpc.proto.RpcProto.RpcMessage other) { if (other == muduo.rpc.proto.RpcProto.RpcMessage.getDefaultInstance()) return this; if (other.hasType()) { setType(other.getType()); } if (other.hasId()) { setId(other.getId()); } if (other.hasService()) { setService(other.getService()); } if (other.hasMethod()) { setMethod(other.getMethod()); } if (other.hasRequest()) { setRequest(other.getRequest()); } if (other.hasResponse()) { setResponse(other.getResponse()); } if (other.hasError()) { setError(other.getError()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasType()) { return false; } if (!hasId()) { return false; } return true; } 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()); onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); onChanged(); return this; } break; } case 8: { int rawValue = input.readEnum(); muduo.rpc.proto.RpcProto.MessageType value = muduo.rpc.proto.RpcProto.MessageType.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(1, rawValue); } else { bitField0_ |= 0x00000001; type_ = value; } break; } case 17: { bitField0_ |= 0x00000002; id_ = input.readFixed64(); break; } case 26: { bitField0_ |= 0x00000004; service_ = input.readBytes(); break; } case 34: { bitField0_ |= 0x00000008; method_ = input.readBytes(); break; } case 42: { bitField0_ |= 0x00000010; request_ = input.readBytes(); break; } case 50: { bitField0_ |= 0x00000020; response_ = input.readBytes(); break; } case 56: { int rawValue = input.readEnum(); muduo.rpc.proto.RpcProto.ErrorCode value = muduo.rpc.proto.RpcProto.ErrorCode.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(7, rawValue); } else { bitField0_ |= 0x00000040; error_ = value; } break; } } } } private int bitField0_; // required .MessageType type = 1; private muduo.rpc.proto.RpcProto.MessageType type_ = muduo.rpc.proto.RpcProto.MessageType.REQUEST; public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } public muduo.rpc.proto.RpcProto.MessageType getType() { return type_; } public Builder setType(muduo.rpc.proto.RpcProto.MessageType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; type_ = value; onChanged(); return this; } public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); type_ = muduo.rpc.proto.RpcProto.MessageType.REQUEST; onChanged(); return this; } // required fixed64 id = 2; private long id_ ; public boolean hasId() { return ((bitField0_ & 0x00000002) == 0x00000002); } public long getId() { return id_; } public Builder setId(long value) { bitField0_ |= 0x00000002; id_ = value; onChanged(); return this; } public Builder clearId() { bitField0_ = (bitField0_ & ~0x00000002); id_ = 0L; onChanged(); return this; } // optional string service = 3; private Object service_ = ""; public boolean hasService() { return ((bitField0_ & 0x00000004) == 0x00000004); } public String getService() { Object ref = service_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); service_ = s; return s; } else { return (String) ref; } } public Builder setService(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; service_ = value; onChanged(); return this; } public Builder clearService() { bitField0_ = (bitField0_ & ~0x00000004); service_ = getDefaultInstance().getService(); onChanged(); return this; } void setService(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000004; service_ = value; onChanged(); } // optional string method = 4; private Object method_ = ""; public boolean hasMethod() { return ((bitField0_ & 0x00000008) == 0x00000008); } public String getMethod() { Object ref = method_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); method_ = s; return s; } else { return (String) ref; } } public Builder setMethod(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; method_ = value; onChanged(); return this; } public Builder clearMethod() { bitField0_ = (bitField0_ & ~0x00000008); method_ = getDefaultInstance().getMethod(); onChanged(); return this; } void setMethod(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000008; method_ = value; onChanged(); } // optional bytes request = 5; private com.google.protobuf.ByteString request_ = com.google.protobuf.ByteString.EMPTY; public boolean hasRequest() { return ((bitField0_ & 0x00000010) == 0x00000010); } public com.google.protobuf.ByteString getRequest() { return request_; } public Builder setRequest(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; request_ = value; onChanged(); return this; } public Builder clearRequest() { bitField0_ = (bitField0_ & ~0x00000010); request_ = getDefaultInstance().getRequest(); onChanged(); return this; } // optional bytes response = 6; private com.google.protobuf.ByteString response_ = com.google.protobuf.ByteString.EMPTY; public boolean hasResponse() { return ((bitField0_ & 0x00000020) == 0x00000020); } public com.google.protobuf.ByteString getResponse() { return response_; } public Builder setResponse(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; response_ = value; onChanged(); return this; } public Builder clearResponse() { bitField0_ = (bitField0_ & ~0x00000020); response_ = getDefaultInstance().getResponse(); onChanged(); return this; } // optional .ErrorCode error = 7; private muduo.rpc.proto.RpcProto.ErrorCode error_ = muduo.rpc.proto.RpcProto.ErrorCode.WRONG_PROTO; public boolean hasError() { return ((bitField0_ & 0x00000040) == 0x00000040); } public muduo.rpc.proto.RpcProto.ErrorCode getError() { return error_; } public Builder setError(muduo.rpc.proto.RpcProto.ErrorCode value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000040; error_ = value; onChanged(); return this; } public Builder clearError() { bitField0_ = (bitField0_ & ~0x00000040); error_ = muduo.rpc.proto.RpcProto.ErrorCode.WRONG_PROTO; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:RpcMessage) } static { defaultInstance = new RpcMessage(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:RpcMessage) } private static com.google.protobuf.Descriptors.Descriptor internal_static_RpcMessage_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_RpcMessage_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\trpc.proto\"\223\001\n\nRpcMessage\022\032\n\004type\030\001 \002(\016" + "2\014.MessageType\022\n\n\002id\030\002 \002(\006\022\017\n\007service\030\003 " + "\001(\t\022\016\n\006method\030\004 \001(\t\022\017\n\007request\030\005 \001(\014\022\020\n\010" + "response\030\006 \001(\014\022\031\n\005error\030\007 \001(\0162\n.ErrorCod" + "e*3\n\013MessageType\022\013\n\007REQUEST\020\001\022\014\n\010RESPONS" + "E\020\002\022\t\n\005ERROR\020\003*f\n\tErrorCode\022\017\n\013WRONG_PRO" + "TO\020\001\022\016\n\nNO_SERVICE\020\002\022\r\n\tNO_METHOD\020\003\022\023\n\017I" + "NVALID_REQUEST\020\004\022\024\n\020INVALID_RESPONSE\020\005B\033" + "\n\017muduo.rpc.protoB\010RpcProto" }; 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_RpcMessage_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_RpcMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_RpcMessage_descriptor, new java.lang.String[] { "Type", "Id", "Service", "Method", "Request", "Response", "Error", }, muduo.rpc.proto.RpcProto.RpcMessage.class, muduo.rpc.proto.RpcProto.RpcMessage.Builder.class); return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); } // @@protoc_insertion_point(outer_class_scope) }