1420c9859SShuo Chen// Generated by the protocol buffer compiler.  DO NOT EDIT!
2420c9859SShuo Chen// source: rpc.proto
3420c9859SShuo Chen
4420c9859SShuo Chenpackage muduo.rpc.proto;
5420c9859SShuo Chen
6420c9859SShuo Chenpublic final class RpcProto {
7420c9859SShuo Chen  private RpcProto() {}
8420c9859SShuo Chen  public static void registerAllExtensions(
9420c9859SShuo Chen      com.google.protobuf.ExtensionRegistry registry) {
10420c9859SShuo Chen  }
11420c9859SShuo Chen  public enum MessageType
12420c9859SShuo Chen      implements com.google.protobuf.ProtocolMessageEnum {
13420c9859SShuo Chen    REQUEST(0, 1),
14420c9859SShuo Chen    RESPONSE(1, 2),
15420c9859SShuo Chen    ERROR(2, 3),
16420c9859SShuo Chen    ;
17420c9859SShuo Chen
18420c9859SShuo Chen    public static final int REQUEST_VALUE = 1;
19420c9859SShuo Chen    public static final int RESPONSE_VALUE = 2;
20420c9859SShuo Chen    public static final int ERROR_VALUE = 3;
21420c9859SShuo Chen
22420c9859SShuo Chen
23420c9859SShuo Chen    public final int getNumber() { return value; }
24420c9859SShuo Chen
25420c9859SShuo Chen    public static MessageType valueOf(int value) {
26420c9859SShuo Chen      switch (value) {
27420c9859SShuo Chen        case 1: return REQUEST;
28420c9859SShuo Chen        case 2: return RESPONSE;
29420c9859SShuo Chen        case 3: return ERROR;
30420c9859SShuo Chen        default: return null;
31420c9859SShuo Chen      }
32420c9859SShuo Chen    }
33420c9859SShuo Chen
34420c9859SShuo Chen    public static com.google.protobuf.Internal.EnumLiteMap<MessageType>
35420c9859SShuo Chen        internalGetValueMap() {
36420c9859SShuo Chen      return internalValueMap;
37420c9859SShuo Chen    }
38420c9859SShuo Chen    private static com.google.protobuf.Internal.EnumLiteMap<MessageType>
39420c9859SShuo Chen        internalValueMap =
40420c9859SShuo Chen          new com.google.protobuf.Internal.EnumLiteMap<MessageType>() {
41420c9859SShuo Chen            public MessageType findValueByNumber(int number) {
42420c9859SShuo Chen              return MessageType.valueOf(number);
43420c9859SShuo Chen            }
44420c9859SShuo Chen          };
45420c9859SShuo Chen
46420c9859SShuo Chen    public final com.google.protobuf.Descriptors.EnumValueDescriptor
47420c9859SShuo Chen        getValueDescriptor() {
48420c9859SShuo Chen      return getDescriptor().getValues().get(index);
49420c9859SShuo Chen    }
50420c9859SShuo Chen    public final com.google.protobuf.Descriptors.EnumDescriptor
51420c9859SShuo Chen        getDescriptorForType() {
52420c9859SShuo Chen      return getDescriptor();
53420c9859SShuo Chen    }
54420c9859SShuo Chen    public static final com.google.protobuf.Descriptors.EnumDescriptor
55420c9859SShuo Chen        getDescriptor() {
56420c9859SShuo Chen      return muduo.rpc.proto.RpcProto.getDescriptor().getEnumTypes().get(0);
57420c9859SShuo Chen    }
58420c9859SShuo Chen
59420c9859SShuo Chen    private static final MessageType[] VALUES = {
60420c9859SShuo Chen      REQUEST, RESPONSE, ERROR,
61420c9859SShuo Chen    };
62420c9859SShuo Chen
63420c9859SShuo Chen    public static MessageType valueOf(
64420c9859SShuo Chen        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
65420c9859SShuo Chen      if (desc.getType() != getDescriptor()) {
66420c9859SShuo Chen        throw new java.lang.IllegalArgumentException(
67420c9859SShuo Chen          "EnumValueDescriptor is not for this type.");
68420c9859SShuo Chen      }
69420c9859SShuo Chen      return VALUES[desc.getIndex()];
70420c9859SShuo Chen    }
71420c9859SShuo Chen
72420c9859SShuo Chen    private final int index;
73420c9859SShuo Chen    private final int value;
74420c9859SShuo Chen
75420c9859SShuo Chen    private MessageType(int index, int value) {
76420c9859SShuo Chen      this.index = index;
77420c9859SShuo Chen      this.value = value;
78420c9859SShuo Chen    }
79420c9859SShuo Chen
80420c9859SShuo Chen    // @@protoc_insertion_point(enum_scope:MessageType)
81420c9859SShuo Chen  }
82420c9859SShuo Chen
83420c9859SShuo Chen  public enum ErrorCode
84420c9859SShuo Chen      implements com.google.protobuf.ProtocolMessageEnum {
85420c9859SShuo Chen    WRONG_PROTO(0, 1),
86420c9859SShuo Chen    NO_SERVICE(1, 2),
87420c9859SShuo Chen    NO_METHOD(2, 3),
88420c9859SShuo Chen    INVALID_REQUEST(3, 4),
89420c9859SShuo Chen    INVALID_RESPONSE(4, 5),
90420c9859SShuo Chen    ;
91420c9859SShuo Chen
92420c9859SShuo Chen    public static final int WRONG_PROTO_VALUE = 1;
93420c9859SShuo Chen    public static final int NO_SERVICE_VALUE = 2;
94420c9859SShuo Chen    public static final int NO_METHOD_VALUE = 3;
95420c9859SShuo Chen    public static final int INVALID_REQUEST_VALUE = 4;
96420c9859SShuo Chen    public static final int INVALID_RESPONSE_VALUE = 5;
97420c9859SShuo Chen
98420c9859SShuo Chen
99420c9859SShuo Chen    public final int getNumber() { return value; }
100420c9859SShuo Chen
101420c9859SShuo Chen    public static ErrorCode valueOf(int value) {
102420c9859SShuo Chen      switch (value) {
103420c9859SShuo Chen        case 1: return WRONG_PROTO;
104420c9859SShuo Chen        case 2: return NO_SERVICE;
105420c9859SShuo Chen        case 3: return NO_METHOD;
106420c9859SShuo Chen        case 4: return INVALID_REQUEST;
107420c9859SShuo Chen        case 5: return INVALID_RESPONSE;
108420c9859SShuo Chen        default: return null;
109420c9859SShuo Chen      }
110420c9859SShuo Chen    }
111420c9859SShuo Chen
112420c9859SShuo Chen    public static com.google.protobuf.Internal.EnumLiteMap<ErrorCode>
113420c9859SShuo Chen        internalGetValueMap() {
114420c9859SShuo Chen      return internalValueMap;
115420c9859SShuo Chen    }
116420c9859SShuo Chen    private static com.google.protobuf.Internal.EnumLiteMap<ErrorCode>
117420c9859SShuo Chen        internalValueMap =
118420c9859SShuo Chen          new com.google.protobuf.Internal.EnumLiteMap<ErrorCode>() {
119420c9859SShuo Chen            public ErrorCode findValueByNumber(int number) {
120420c9859SShuo Chen              return ErrorCode.valueOf(number);
121420c9859SShuo Chen            }
122420c9859SShuo Chen          };
123420c9859SShuo Chen
124420c9859SShuo Chen    public final com.google.protobuf.Descriptors.EnumValueDescriptor
125420c9859SShuo Chen        getValueDescriptor() {
126420c9859SShuo Chen      return getDescriptor().getValues().get(index);
127420c9859SShuo Chen    }
128420c9859SShuo Chen    public final com.google.protobuf.Descriptors.EnumDescriptor
129420c9859SShuo Chen        getDescriptorForType() {
130420c9859SShuo Chen      return getDescriptor();
131420c9859SShuo Chen    }
132420c9859SShuo Chen    public static final com.google.protobuf.Descriptors.EnumDescriptor
133420c9859SShuo Chen        getDescriptor() {
134420c9859SShuo Chen      return muduo.rpc.proto.RpcProto.getDescriptor().getEnumTypes().get(1);
135420c9859SShuo Chen    }
136420c9859SShuo Chen
137420c9859SShuo Chen    private static final ErrorCode[] VALUES = {
138420c9859SShuo Chen      WRONG_PROTO, NO_SERVICE, NO_METHOD, INVALID_REQUEST, INVALID_RESPONSE,
139420c9859SShuo Chen    };
140420c9859SShuo Chen
141420c9859SShuo Chen    public static ErrorCode valueOf(
142420c9859SShuo Chen        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
143420c9859SShuo Chen      if (desc.getType() != getDescriptor()) {
144420c9859SShuo Chen        throw new java.lang.IllegalArgumentException(
145420c9859SShuo Chen          "EnumValueDescriptor is not for this type.");
146420c9859SShuo Chen      }
147420c9859SShuo Chen      return VALUES[desc.getIndex()];
148420c9859SShuo Chen    }
149420c9859SShuo Chen
150420c9859SShuo Chen    private final int index;
151420c9859SShuo Chen    private final int value;
152420c9859SShuo Chen
153420c9859SShuo Chen    private ErrorCode(int index, int value) {
154420c9859SShuo Chen      this.index = index;
155420c9859SShuo Chen      this.value = value;
156420c9859SShuo Chen    }
157420c9859SShuo Chen
158420c9859SShuo Chen    // @@protoc_insertion_point(enum_scope:ErrorCode)
159420c9859SShuo Chen  }
160420c9859SShuo Chen
161420c9859SShuo Chen  public interface RpcMessageOrBuilder
162420c9859SShuo Chen      extends com.google.protobuf.MessageOrBuilder {
163420c9859SShuo Chen
164420c9859SShuo Chen    // required .MessageType type = 1;
165420c9859SShuo Chen    boolean hasType();
166420c9859SShuo Chen    muduo.rpc.proto.RpcProto.MessageType getType();
167420c9859SShuo Chen
168420c9859SShuo Chen    // required fixed64 id = 2;
169420c9859SShuo Chen    boolean hasId();
170420c9859SShuo Chen    long getId();
171420c9859SShuo Chen
172420c9859SShuo Chen    // optional string service = 3;
173420c9859SShuo Chen    boolean hasService();
174420c9859SShuo Chen    String getService();
175420c9859SShuo Chen
176420c9859SShuo Chen    // optional string method = 4;
177420c9859SShuo Chen    boolean hasMethod();
178420c9859SShuo Chen    String getMethod();
179420c9859SShuo Chen
180420c9859SShuo Chen    // optional bytes request = 5;
181420c9859SShuo Chen    boolean hasRequest();
182420c9859SShuo Chen    com.google.protobuf.ByteString getRequest();
183420c9859SShuo Chen
184420c9859SShuo Chen    // optional bytes response = 6;
185420c9859SShuo Chen    boolean hasResponse();
186420c9859SShuo Chen    com.google.protobuf.ByteString getResponse();
187420c9859SShuo Chen
188420c9859SShuo Chen    // optional .ErrorCode error = 7;
189420c9859SShuo Chen    boolean hasError();
190420c9859SShuo Chen    muduo.rpc.proto.RpcProto.ErrorCode getError();
191420c9859SShuo Chen  }
192420c9859SShuo Chen  public static final class RpcMessage extends
193420c9859SShuo Chen      com.google.protobuf.GeneratedMessage
194420c9859SShuo Chen      implements RpcMessageOrBuilder {
195420c9859SShuo Chen    // Use RpcMessage.newBuilder() to construct.
196420c9859SShuo Chen    private RpcMessage(Builder builder) {
197420c9859SShuo Chen      super(builder);
198420c9859SShuo Chen    }
199420c9859SShuo Chen    private RpcMessage(boolean noInit) {}
200420c9859SShuo Chen
201420c9859SShuo Chen    private static final RpcMessage defaultInstance;
202420c9859SShuo Chen    public static RpcMessage getDefaultInstance() {
203420c9859SShuo Chen      return defaultInstance;
204420c9859SShuo Chen    }
205420c9859SShuo Chen
206420c9859SShuo Chen    public RpcMessage getDefaultInstanceForType() {
207420c9859SShuo Chen      return defaultInstance;
208420c9859SShuo Chen    }
209420c9859SShuo Chen
210420c9859SShuo Chen    public static final com.google.protobuf.Descriptors.Descriptor
211420c9859SShuo Chen        getDescriptor() {
212420c9859SShuo Chen      return muduo.rpc.proto.RpcProto.internal_static_RpcMessage_descriptor;
213420c9859SShuo Chen    }
214420c9859SShuo Chen
215420c9859SShuo Chen    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
216420c9859SShuo Chen        internalGetFieldAccessorTable() {
217420c9859SShuo Chen      return muduo.rpc.proto.RpcProto.internal_static_RpcMessage_fieldAccessorTable;
218420c9859SShuo Chen    }
219420c9859SShuo Chen
220420c9859SShuo Chen    private int bitField0_;
221420c9859SShuo Chen    // required .MessageType type = 1;
222420c9859SShuo Chen    public static final int TYPE_FIELD_NUMBER = 1;
223420c9859SShuo Chen    private muduo.rpc.proto.RpcProto.MessageType type_;
224420c9859SShuo Chen    public boolean hasType() {
225420c9859SShuo Chen      return ((bitField0_ & 0x00000001) == 0x00000001);
226420c9859SShuo Chen    }
227420c9859SShuo Chen    public muduo.rpc.proto.RpcProto.MessageType getType() {
228420c9859SShuo Chen      return type_;
229420c9859SShuo Chen    }
230420c9859SShuo Chen
231420c9859SShuo Chen    // required fixed64 id = 2;
232420c9859SShuo Chen    public static final int ID_FIELD_NUMBER = 2;
233420c9859SShuo Chen    private long id_;
234420c9859SShuo Chen    public boolean hasId() {
235420c9859SShuo Chen      return ((bitField0_ & 0x00000002) == 0x00000002);
236420c9859SShuo Chen    }
237420c9859SShuo Chen    public long getId() {
238420c9859SShuo Chen      return id_;
239420c9859SShuo Chen    }
240420c9859SShuo Chen
241420c9859SShuo Chen    // optional string service = 3;
242420c9859SShuo Chen    public static final int SERVICE_FIELD_NUMBER = 3;
243420c9859SShuo Chen    private Object service_;
244420c9859SShuo Chen    public boolean hasService() {
245420c9859SShuo Chen      return ((bitField0_ & 0x00000004) == 0x00000004);
246420c9859SShuo Chen    }
247420c9859SShuo Chen    public String getService() {
248420c9859SShuo Chen      Object ref = service_;
249420c9859SShuo Chen      if (ref instanceof String) {
250420c9859SShuo Chen        return (String) ref;
251420c9859SShuo Chen      } else {
252420c9859SShuo Chen        com.google.protobuf.ByteString bs =
253420c9859SShuo Chen            (com.google.protobuf.ByteString) ref;
254420c9859SShuo Chen        String s = bs.toStringUtf8();
255420c9859SShuo Chen        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
256420c9859SShuo Chen          service_ = s;
257420c9859SShuo Chen        }
258420c9859SShuo Chen        return s;
259420c9859SShuo Chen      }
260420c9859SShuo Chen    }
261420c9859SShuo Chen    private com.google.protobuf.ByteString getServiceBytes() {
262420c9859SShuo Chen      Object ref = service_;
263420c9859SShuo Chen      if (ref instanceof String) {
264420c9859SShuo Chen        com.google.protobuf.ByteString b =
265420c9859SShuo Chen            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
266420c9859SShuo Chen        service_ = b;
267420c9859SShuo Chen        return b;
268420c9859SShuo Chen      } else {
269420c9859SShuo Chen        return (com.google.protobuf.ByteString) ref;
270420c9859SShuo Chen      }
271420c9859SShuo Chen    }
272420c9859SShuo Chen
273420c9859SShuo Chen    // optional string method = 4;
274420c9859SShuo Chen    public static final int METHOD_FIELD_NUMBER = 4;
275420c9859SShuo Chen    private Object method_;
276420c9859SShuo Chen    public boolean hasMethod() {
277420c9859SShuo Chen      return ((bitField0_ & 0x00000008) == 0x00000008);
278420c9859SShuo Chen    }
279420c9859SShuo Chen    public String getMethod() {
280420c9859SShuo Chen      Object ref = method_;
281420c9859SShuo Chen      if (ref instanceof String) {
282420c9859SShuo Chen        return (String) ref;
283420c9859SShuo Chen      } else {
284420c9859SShuo Chen        com.google.protobuf.ByteString bs =
285420c9859SShuo Chen            (com.google.protobuf.ByteString) ref;
286420c9859SShuo Chen        String s = bs.toStringUtf8();
287420c9859SShuo Chen        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
288420c9859SShuo Chen          method_ = s;
289420c9859SShuo Chen        }
290420c9859SShuo Chen        return s;
291420c9859SShuo Chen      }
292420c9859SShuo Chen    }
293420c9859SShuo Chen    private com.google.protobuf.ByteString getMethodBytes() {
294420c9859SShuo Chen      Object ref = method_;
295420c9859SShuo Chen      if (ref instanceof String) {
296420c9859SShuo Chen        com.google.protobuf.ByteString b =
297420c9859SShuo Chen            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
298420c9859SShuo Chen        method_ = b;
299420c9859SShuo Chen        return b;
300420c9859SShuo Chen      } else {
301420c9859SShuo Chen        return (com.google.protobuf.ByteString) ref;
302420c9859SShuo Chen      }
303420c9859SShuo Chen    }
304420c9859SShuo Chen
305420c9859SShuo Chen    // optional bytes request = 5;
306420c9859SShuo Chen    public static final int REQUEST_FIELD_NUMBER = 5;
307420c9859SShuo Chen    private com.google.protobuf.ByteString request_;
308420c9859SShuo Chen    public boolean hasRequest() {
309420c9859SShuo Chen      return ((bitField0_ & 0x00000010) == 0x00000010);
310420c9859SShuo Chen    }
311420c9859SShuo Chen    public com.google.protobuf.ByteString getRequest() {
312420c9859SShuo Chen      return request_;
313420c9859SShuo Chen    }
314420c9859SShuo Chen
315420c9859SShuo Chen    // optional bytes response = 6;
316420c9859SShuo Chen    public static final int RESPONSE_FIELD_NUMBER = 6;
317420c9859SShuo Chen    private com.google.protobuf.ByteString response_;
318420c9859SShuo Chen    public boolean hasResponse() {
319420c9859SShuo Chen      return ((bitField0_ & 0x00000020) == 0x00000020);
320420c9859SShuo Chen    }
321420c9859SShuo Chen    public com.google.protobuf.ByteString getResponse() {
322420c9859SShuo Chen      return response_;
323420c9859SShuo Chen    }
324420c9859SShuo Chen
325420c9859SShuo Chen    // optional .ErrorCode error = 7;
326420c9859SShuo Chen    public static final int ERROR_FIELD_NUMBER = 7;
327420c9859SShuo Chen    private muduo.rpc.proto.RpcProto.ErrorCode error_;
328420c9859SShuo Chen    public boolean hasError() {
329420c9859SShuo Chen      return ((bitField0_ & 0x00000040) == 0x00000040);
330420c9859SShuo Chen    }
331420c9859SShuo Chen    public muduo.rpc.proto.RpcProto.ErrorCode getError() {
332420c9859SShuo Chen      return error_;
333420c9859SShuo Chen    }
334420c9859SShuo Chen
335420c9859SShuo Chen    private void initFields() {
336420c9859SShuo Chen      type_ = muduo.rpc.proto.RpcProto.MessageType.REQUEST;
337420c9859SShuo Chen      id_ = 0L;
338420c9859SShuo Chen      service_ = "";
339420c9859SShuo Chen      method_ = "";
340420c9859SShuo Chen      request_ = com.google.protobuf.ByteString.EMPTY;
341420c9859SShuo Chen      response_ = com.google.protobuf.ByteString.EMPTY;
342420c9859SShuo Chen      error_ = muduo.rpc.proto.RpcProto.ErrorCode.WRONG_PROTO;
343420c9859SShuo Chen    }
344420c9859SShuo Chen    private byte memoizedIsInitialized = -1;
345420c9859SShuo Chen    public final boolean isInitialized() {
346420c9859SShuo Chen      byte isInitialized = memoizedIsInitialized;
347420c9859SShuo Chen      if (isInitialized != -1) return isInitialized == 1;
348420c9859SShuo Chen
349420c9859SShuo Chen      if (!hasType()) {
350420c9859SShuo Chen        memoizedIsInitialized = 0;
351420c9859SShuo Chen        return false;
352420c9859SShuo Chen      }
353420c9859SShuo Chen      if (!hasId()) {
354420c9859SShuo Chen        memoizedIsInitialized = 0;
355420c9859SShuo Chen        return false;
356420c9859SShuo Chen      }
357420c9859SShuo Chen      memoizedIsInitialized = 1;
358420c9859SShuo Chen      return true;
359420c9859SShuo Chen    }
360420c9859SShuo Chen
361420c9859SShuo Chen    public void writeTo(com.google.protobuf.CodedOutputStream output)
362420c9859SShuo Chen                        throws java.io.IOException {
363420c9859SShuo Chen      getSerializedSize();
364420c9859SShuo Chen      if (((bitField0_ & 0x00000001) == 0x00000001)) {
365420c9859SShuo Chen        output.writeEnum(1, type_.getNumber());
366420c9859SShuo Chen      }
367420c9859SShuo Chen      if (((bitField0_ & 0x00000002) == 0x00000002)) {
368420c9859SShuo Chen        output.writeFixed64(2, id_);
369420c9859SShuo Chen      }
370420c9859SShuo Chen      if (((bitField0_ & 0x00000004) == 0x00000004)) {
371420c9859SShuo Chen        output.writeBytes(3, getServiceBytes());
372420c9859SShuo Chen      }
373420c9859SShuo Chen      if (((bitField0_ & 0x00000008) == 0x00000008)) {
374420c9859SShuo Chen        output.writeBytes(4, getMethodBytes());
375420c9859SShuo Chen      }
376420c9859SShuo Chen      if (((bitField0_ & 0x00000010) == 0x00000010)) {
377420c9859SShuo Chen        output.writeBytes(5, request_);
378420c9859SShuo Chen      }
379420c9859SShuo Chen      if (((bitField0_ & 0x00000020) == 0x00000020)) {
380420c9859SShuo Chen        output.writeBytes(6, response_);
381420c9859SShuo Chen      }
382420c9859SShuo Chen      if (((bitField0_ & 0x00000040) == 0x00000040)) {
383420c9859SShuo Chen        output.writeEnum(7, error_.getNumber());
384420c9859SShuo Chen      }
385420c9859SShuo Chen      getUnknownFields().writeTo(output);
386420c9859SShuo Chen    }
387420c9859SShuo Chen
388420c9859SShuo Chen    private int memoizedSerializedSize = -1;
389420c9859SShuo Chen    public int getSerializedSize() {
390420c9859SShuo Chen      int size = memoizedSerializedSize;
391420c9859SShuo Chen      if (size != -1) return size;
392420c9859SShuo Chen
393420c9859SShuo Chen      size = 0;
394420c9859SShuo Chen      if (((bitField0_ & 0x00000001) == 0x00000001)) {
395420c9859SShuo Chen        size += com.google.protobuf.CodedOutputStream
396420c9859SShuo Chen          .computeEnumSize(1, type_.getNumber());
397420c9859SShuo Chen      }
398420c9859SShuo Chen      if (((bitField0_ & 0x00000002) == 0x00000002)) {
399420c9859SShuo Chen        size += com.google.protobuf.CodedOutputStream
400420c9859SShuo Chen          .computeFixed64Size(2, id_);
401420c9859SShuo Chen      }
402420c9859SShuo Chen      if (((bitField0_ & 0x00000004) == 0x00000004)) {
403420c9859SShuo Chen        size += com.google.protobuf.CodedOutputStream
404420c9859SShuo Chen          .computeBytesSize(3, getServiceBytes());
405420c9859SShuo Chen      }
406420c9859SShuo Chen      if (((bitField0_ & 0x00000008) == 0x00000008)) {
407420c9859SShuo Chen        size += com.google.protobuf.CodedOutputStream
408420c9859SShuo Chen          .computeBytesSize(4, getMethodBytes());
409420c9859SShuo Chen      }
410420c9859SShuo Chen      if (((bitField0_ & 0x00000010) == 0x00000010)) {
411420c9859SShuo Chen        size += com.google.protobuf.CodedOutputStream
412420c9859SShuo Chen          .computeBytesSize(5, request_);
413420c9859SShuo Chen      }
414420c9859SShuo Chen      if (((bitField0_ & 0x00000020) == 0x00000020)) {
415420c9859SShuo Chen        size += com.google.protobuf.CodedOutputStream
416420c9859SShuo Chen          .computeBytesSize(6, response_);
417420c9859SShuo Chen      }
418420c9859SShuo Chen      if (((bitField0_ & 0x00000040) == 0x00000040)) {
419420c9859SShuo Chen        size += com.google.protobuf.CodedOutputStream
420420c9859SShuo Chen          .computeEnumSize(7, error_.getNumber());
421420c9859SShuo Chen      }
422420c9859SShuo Chen      size += getUnknownFields().getSerializedSize();
423420c9859SShuo Chen      memoizedSerializedSize = size;
424420c9859SShuo Chen      return size;
425420c9859SShuo Chen    }
426420c9859SShuo Chen
427420c9859SShuo Chen    @java.lang.Override
428420c9859SShuo Chen    protected Object writeReplace() throws java.io.ObjectStreamException {
429420c9859SShuo Chen      return super.writeReplace();
430420c9859SShuo Chen    }
431420c9859SShuo Chen
432420c9859SShuo Chen    public static muduo.rpc.proto.RpcProto.RpcMessage parseFrom(
433420c9859SShuo Chen        com.google.protobuf.ByteString data)
434420c9859SShuo Chen        throws com.google.protobuf.InvalidProtocolBufferException {
435420c9859SShuo Chen      return newBuilder().mergeFrom(data).buildParsed();
436420c9859SShuo Chen    }
437420c9859SShuo Chen    public static muduo.rpc.proto.RpcProto.RpcMessage parseFrom(
438420c9859SShuo Chen        com.google.protobuf.ByteString data,
439420c9859SShuo Chen        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
440420c9859SShuo Chen        throws com.google.protobuf.InvalidProtocolBufferException {
441420c9859SShuo Chen      return newBuilder().mergeFrom(data, extensionRegistry)
442420c9859SShuo Chen               .buildParsed();
443420c9859SShuo Chen    }
444420c9859SShuo Chen    public static muduo.rpc.proto.RpcProto.RpcMessage parseFrom(byte[] data)
445420c9859SShuo Chen        throws com.google.protobuf.InvalidProtocolBufferException {
446420c9859SShuo Chen      return newBuilder().mergeFrom(data).buildParsed();
447420c9859SShuo Chen    }
448420c9859SShuo Chen    public static muduo.rpc.proto.RpcProto.RpcMessage parseFrom(
449420c9859SShuo Chen        byte[] data,
450420c9859SShuo Chen        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
451420c9859SShuo Chen        throws com.google.protobuf.InvalidProtocolBufferException {
452420c9859SShuo Chen      return newBuilder().mergeFrom(data, extensionRegistry)
453420c9859SShuo Chen               .buildParsed();
454420c9859SShuo Chen    }
455420c9859SShuo Chen    public static muduo.rpc.proto.RpcProto.RpcMessage parseFrom(java.io.InputStream input)
456420c9859SShuo Chen        throws java.io.IOException {
457420c9859SShuo Chen      return newBuilder().mergeFrom(input).buildParsed();
458420c9859SShuo Chen    }
459420c9859SShuo Chen    public static muduo.rpc.proto.RpcProto.RpcMessage parseFrom(
460420c9859SShuo Chen        java.io.InputStream input,
461420c9859SShuo Chen        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
462420c9859SShuo Chen        throws java.io.IOException {
463420c9859SShuo Chen      return newBuilder().mergeFrom(input, extensionRegistry)
464420c9859SShuo Chen               .buildParsed();
465420c9859SShuo Chen    }
466420c9859SShuo Chen    public static muduo.rpc.proto.RpcProto.RpcMessage parseDelimitedFrom(java.io.InputStream input)
467420c9859SShuo Chen        throws java.io.IOException {
468420c9859SShuo Chen      Builder builder = newBuilder();
469420c9859SShuo Chen      if (builder.mergeDelimitedFrom(input)) {
470420c9859SShuo Chen        return builder.buildParsed();
471420c9859SShuo Chen      } else {
472420c9859SShuo Chen        return null;
473420c9859SShuo Chen      }
474420c9859SShuo Chen    }
475420c9859SShuo Chen    public static muduo.rpc.proto.RpcProto.RpcMessage parseDelimitedFrom(
476420c9859SShuo Chen        java.io.InputStream input,
477420c9859SShuo Chen        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
478420c9859SShuo Chen        throws java.io.IOException {
479420c9859SShuo Chen      Builder builder = newBuilder();
480420c9859SShuo Chen      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
481420c9859SShuo Chen        return builder.buildParsed();
482420c9859SShuo Chen      } else {
483420c9859SShuo Chen        return null;
484420c9859SShuo Chen      }
485420c9859SShuo Chen    }
486420c9859SShuo Chen    public static muduo.rpc.proto.RpcProto.RpcMessage parseFrom(
487420c9859SShuo Chen        com.google.protobuf.CodedInputStream input)
488420c9859SShuo Chen        throws java.io.IOException {
489420c9859SShuo Chen      return newBuilder().mergeFrom(input).buildParsed();
490420c9859SShuo Chen    }
491420c9859SShuo Chen    public static muduo.rpc.proto.RpcProto.RpcMessage parseFrom(
492420c9859SShuo Chen        com.google.protobuf.CodedInputStream input,
493420c9859SShuo Chen        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
494420c9859SShuo Chen        throws java.io.IOException {
495420c9859SShuo Chen      return newBuilder().mergeFrom(input, extensionRegistry)
496420c9859SShuo Chen               .buildParsed();
497420c9859SShuo Chen    }
498420c9859SShuo Chen
499420c9859SShuo Chen    public static Builder newBuilder() { return Builder.create(); }
500420c9859SShuo Chen    public Builder newBuilderForType() { return newBuilder(); }
501420c9859SShuo Chen    public static Builder newBuilder(muduo.rpc.proto.RpcProto.RpcMessage prototype) {
502420c9859SShuo Chen      return newBuilder().mergeFrom(prototype);
503420c9859SShuo Chen    }
504420c9859SShuo Chen    public Builder toBuilder() { return newBuilder(this); }
505420c9859SShuo Chen
506420c9859SShuo Chen    @java.lang.Override
507420c9859SShuo Chen    protected Builder newBuilderForType(
508420c9859SShuo Chen        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
509420c9859SShuo Chen      Builder builder = new Builder(parent);
510420c9859SShuo Chen      return builder;
511420c9859SShuo Chen    }
512420c9859SShuo Chen    public static final class Builder extends
513420c9859SShuo Chen        com.google.protobuf.GeneratedMessage.Builder<Builder>
514420c9859SShuo Chen       implements muduo.rpc.proto.RpcProto.RpcMessageOrBuilder {
515420c9859SShuo Chen      public static final com.google.protobuf.Descriptors.Descriptor
516420c9859SShuo Chen          getDescriptor() {
517420c9859SShuo Chen        return muduo.rpc.proto.RpcProto.internal_static_RpcMessage_descriptor;
518420c9859SShuo Chen      }
519420c9859SShuo Chen
520420c9859SShuo Chen      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
521420c9859SShuo Chen          internalGetFieldAccessorTable() {
522420c9859SShuo Chen        return muduo.rpc.proto.RpcProto.internal_static_RpcMessage_fieldAccessorTable;
523420c9859SShuo Chen      }
524420c9859SShuo Chen
525420c9859SShuo Chen      // Construct using muduo.rpc.proto.RpcProto.RpcMessage.newBuilder()
526420c9859SShuo Chen      private Builder() {
527420c9859SShuo Chen        maybeForceBuilderInitialization();
528420c9859SShuo Chen      }
529420c9859SShuo Chen
530420c9859SShuo Chen      private Builder(BuilderParent parent) {
531420c9859SShuo Chen        super(parent);
532420c9859SShuo Chen        maybeForceBuilderInitialization();
533420c9859SShuo Chen      }
534420c9859SShuo Chen      private void maybeForceBuilderInitialization() {
535420c9859SShuo Chen        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
536420c9859SShuo Chen        }
537420c9859SShuo Chen      }
538420c9859SShuo Chen      private static Builder create() {
539420c9859SShuo Chen        return new Builder();
540420c9859SShuo Chen      }
541420c9859SShuo Chen
542420c9859SShuo Chen      public Builder clear() {
543420c9859SShuo Chen        super.clear();
544420c9859SShuo Chen        type_ = muduo.rpc.proto.RpcProto.MessageType.REQUEST;
545420c9859SShuo Chen        bitField0_ = (bitField0_ & ~0x00000001);
546420c9859SShuo Chen        id_ = 0L;
547420c9859SShuo Chen        bitField0_ = (bitField0_ & ~0x00000002);
548420c9859SShuo Chen        service_ = "";
549420c9859SShuo Chen        bitField0_ = (bitField0_ & ~0x00000004);
550420c9859SShuo Chen        method_ = "";
551420c9859SShuo Chen        bitField0_ = (bitField0_ & ~0x00000008);
552420c9859SShuo Chen        request_ = com.google.protobuf.ByteString.EMPTY;
553420c9859SShuo Chen        bitField0_ = (bitField0_ & ~0x00000010);
554420c9859SShuo Chen        response_ = com.google.protobuf.ByteString.EMPTY;
555420c9859SShuo Chen        bitField0_ = (bitField0_ & ~0x00000020);
556420c9859SShuo Chen        error_ = muduo.rpc.proto.RpcProto.ErrorCode.WRONG_PROTO;
557420c9859SShuo Chen        bitField0_ = (bitField0_ & ~0x00000040);
558420c9859SShuo Chen        return this;
559420c9859SShuo Chen      }
560420c9859SShuo Chen
561420c9859SShuo Chen      public Builder clone() {
562420c9859SShuo Chen        return create().mergeFrom(buildPartial());
563420c9859SShuo Chen      }
564420c9859SShuo Chen
565420c9859SShuo Chen      public com.google.protobuf.Descriptors.Descriptor
566420c9859SShuo Chen          getDescriptorForType() {
567420c9859SShuo Chen        return muduo.rpc.proto.RpcProto.RpcMessage.getDescriptor();
568420c9859SShuo Chen      }
569420c9859SShuo Chen
570420c9859SShuo Chen      public muduo.rpc.proto.RpcProto.RpcMessage getDefaultInstanceForType() {
571420c9859SShuo Chen        return muduo.rpc.proto.RpcProto.RpcMessage.getDefaultInstance();
572420c9859SShuo Chen      }
573420c9859SShuo Chen
574420c9859SShuo Chen      public muduo.rpc.proto.RpcProto.RpcMessage build() {
575420c9859SShuo Chen        muduo.rpc.proto.RpcProto.RpcMessage result = buildPartial();
576420c9859SShuo Chen        if (!result.isInitialized()) {
577420c9859SShuo Chen          throw newUninitializedMessageException(result);
578420c9859SShuo Chen        }
579420c9859SShuo Chen        return result;
580420c9859SShuo Chen      }
581420c9859SShuo Chen
582420c9859SShuo Chen      private muduo.rpc.proto.RpcProto.RpcMessage buildParsed()
583420c9859SShuo Chen          throws com.google.protobuf.InvalidProtocolBufferException {
584420c9859SShuo Chen        muduo.rpc.proto.RpcProto.RpcMessage result = buildPartial();
585420c9859SShuo Chen        if (!result.isInitialized()) {
586420c9859SShuo Chen          throw newUninitializedMessageException(
587420c9859SShuo Chen            result).asInvalidProtocolBufferException();
588420c9859SShuo Chen        }
589420c9859SShuo Chen        return result;
590420c9859SShuo Chen      }
591420c9859SShuo Chen
592420c9859SShuo Chen      public muduo.rpc.proto.RpcProto.RpcMessage buildPartial() {
593420c9859SShuo Chen        muduo.rpc.proto.RpcProto.RpcMessage result = new muduo.rpc.proto.RpcProto.RpcMessage(this);
594420c9859SShuo Chen        int from_bitField0_ = bitField0_;
595420c9859SShuo Chen        int to_bitField0_ = 0;
596420c9859SShuo Chen        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
597420c9859SShuo Chen          to_bitField0_ |= 0x00000001;
598420c9859SShuo Chen        }
599420c9859SShuo Chen        result.type_ = type_;
600420c9859SShuo Chen        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
601420c9859SShuo Chen          to_bitField0_ |= 0x00000002;
602420c9859SShuo Chen        }
603420c9859SShuo Chen        result.id_ = id_;
604420c9859SShuo Chen        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
605420c9859SShuo Chen          to_bitField0_ |= 0x00000004;
606420c9859SShuo Chen        }
607420c9859SShuo Chen        result.service_ = service_;
608420c9859SShuo Chen        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
609420c9859SShuo Chen          to_bitField0_ |= 0x00000008;
610420c9859SShuo Chen        }
611420c9859SShuo Chen        result.method_ = method_;
612420c9859SShuo Chen        if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
613420c9859SShuo Chen          to_bitField0_ |= 0x00000010;
614420c9859SShuo Chen        }
615420c9859SShuo Chen        result.request_ = request_;
616420c9859SShuo Chen        if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
617420c9859SShuo Chen          to_bitField0_ |= 0x00000020;
618420c9859SShuo Chen        }
619420c9859SShuo Chen        result.response_ = response_;
620420c9859SShuo Chen        if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
621420c9859SShuo Chen          to_bitField0_ |= 0x00000040;
622420c9859SShuo Chen        }
623420c9859SShuo Chen        result.error_ = error_;
624420c9859SShuo Chen        result.bitField0_ = to_bitField0_;
625420c9859SShuo Chen        onBuilt();
626420c9859SShuo Chen        return result;
627420c9859SShuo Chen      }
628420c9859SShuo Chen
629420c9859SShuo Chen      public Builder mergeFrom(com.google.protobuf.Message other) {
630420c9859SShuo Chen        if (other instanceof muduo.rpc.proto.RpcProto.RpcMessage) {
631420c9859SShuo Chen          return mergeFrom((muduo.rpc.proto.RpcProto.RpcMessage)other);
632420c9859SShuo Chen        } else {
633420c9859SShuo Chen          super.mergeFrom(other);
634420c9859SShuo Chen          return this;
635420c9859SShuo Chen        }
636420c9859SShuo Chen      }
637420c9859SShuo Chen
638420c9859SShuo Chen      public Builder mergeFrom(muduo.rpc.proto.RpcProto.RpcMessage other) {
639420c9859SShuo Chen        if (other == muduo.rpc.proto.RpcProto.RpcMessage.getDefaultInstance()) return this;
640420c9859SShuo Chen        if (other.hasType()) {
641420c9859SShuo Chen          setType(other.getType());
642420c9859SShuo Chen        }
643420c9859SShuo Chen        if (other.hasId()) {
644420c9859SShuo Chen          setId(other.getId());
645420c9859SShuo Chen        }
646420c9859SShuo Chen        if (other.hasService()) {
647420c9859SShuo Chen          setService(other.getService());
648420c9859SShuo Chen        }
649420c9859SShuo Chen        if (other.hasMethod()) {
650420c9859SShuo Chen          setMethod(other.getMethod());
651420c9859SShuo Chen        }
652420c9859SShuo Chen        if (other.hasRequest()) {
653420c9859SShuo Chen          setRequest(other.getRequest());
654420c9859SShuo Chen        }
655420c9859SShuo Chen        if (other.hasResponse()) {
656420c9859SShuo Chen          setResponse(other.getResponse());
657420c9859SShuo Chen        }
658420c9859SShuo Chen        if (other.hasError()) {
659420c9859SShuo Chen          setError(other.getError());
660420c9859SShuo Chen        }
661420c9859SShuo Chen        this.mergeUnknownFields(other.getUnknownFields());
662420c9859SShuo Chen        return this;
663420c9859SShuo Chen      }
664420c9859SShuo Chen
665420c9859SShuo Chen      public final boolean isInitialized() {
666420c9859SShuo Chen        if (!hasType()) {
667420c9859SShuo Chen
668420c9859SShuo Chen          return false;
669420c9859SShuo Chen        }
670420c9859SShuo Chen        if (!hasId()) {
671420c9859SShuo Chen
672420c9859SShuo Chen          return false;
673420c9859SShuo Chen        }
674420c9859SShuo Chen        return true;
675420c9859SShuo Chen      }
676420c9859SShuo Chen
677420c9859SShuo Chen      public Builder mergeFrom(
678420c9859SShuo Chen          com.google.protobuf.CodedInputStream input,
679420c9859SShuo Chen          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
680420c9859SShuo Chen          throws java.io.IOException {
681420c9859SShuo Chen        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
682420c9859SShuo Chen          com.google.protobuf.UnknownFieldSet.newBuilder(
683420c9859SShuo Chen            this.getUnknownFields());
684420c9859SShuo Chen        while (true) {
685420c9859SShuo Chen          int tag = input.readTag();
686420c9859SShuo Chen          switch (tag) {
687420c9859SShuo Chen            case 0:
688420c9859SShuo Chen              this.setUnknownFields(unknownFields.build());
689420c9859SShuo Chen              onChanged();
690420c9859SShuo Chen              return this;
691420c9859SShuo Chen            default: {
692420c9859SShuo Chen              if (!parseUnknownField(input, unknownFields,
693420c9859SShuo Chen                                     extensionRegistry, tag)) {
694420c9859SShuo Chen                this.setUnknownFields(unknownFields.build());
695420c9859SShuo Chen                onChanged();
696420c9859SShuo Chen                return this;
697420c9859SShuo Chen              }
698420c9859SShuo Chen              break;
699420c9859SShuo Chen            }
700420c9859SShuo Chen            case 8: {
701420c9859SShuo Chen              int rawValue = input.readEnum();
702420c9859SShuo Chen              muduo.rpc.proto.RpcProto.MessageType value = muduo.rpc.proto.RpcProto.MessageType.valueOf(rawValue);
703420c9859SShuo Chen              if (value == null) {
704420c9859SShuo Chen                unknownFields.mergeVarintField(1, rawValue);
705420c9859SShuo Chen              } else {
706420c9859SShuo Chen                bitField0_ |= 0x00000001;
707420c9859SShuo Chen                type_ = value;
708420c9859SShuo Chen              }
709420c9859SShuo Chen              break;
710420c9859SShuo Chen            }
711420c9859SShuo Chen            case 17: {
712420c9859SShuo Chen              bitField0_ |= 0x00000002;
713420c9859SShuo Chen              id_ = input.readFixed64();
714420c9859SShuo Chen              break;
715420c9859SShuo Chen            }
716420c9859SShuo Chen            case 26: {
717420c9859SShuo Chen              bitField0_ |= 0x00000004;
718420c9859SShuo Chen              service_ = input.readBytes();
719420c9859SShuo Chen              break;
720420c9859SShuo Chen            }
721420c9859SShuo Chen            case 34: {
722420c9859SShuo Chen              bitField0_ |= 0x00000008;
723420c9859SShuo Chen              method_ = input.readBytes();
724420c9859SShuo Chen              break;
725420c9859SShuo Chen            }
726420c9859SShuo Chen            case 42: {
727420c9859SShuo Chen              bitField0_ |= 0x00000010;
728420c9859SShuo Chen              request_ = input.readBytes();
729420c9859SShuo Chen              break;
730420c9859SShuo Chen            }
731420c9859SShuo Chen            case 50: {
732420c9859SShuo Chen              bitField0_ |= 0x00000020;
733420c9859SShuo Chen              response_ = input.readBytes();
734420c9859SShuo Chen              break;
735420c9859SShuo Chen            }
736420c9859SShuo Chen            case 56: {
737420c9859SShuo Chen              int rawValue = input.readEnum();
738420c9859SShuo Chen              muduo.rpc.proto.RpcProto.ErrorCode value = muduo.rpc.proto.RpcProto.ErrorCode.valueOf(rawValue);
739420c9859SShuo Chen              if (value == null) {
740420c9859SShuo Chen                unknownFields.mergeVarintField(7, rawValue);
741420c9859SShuo Chen              } else {
742420c9859SShuo Chen                bitField0_ |= 0x00000040;
743420c9859SShuo Chen                error_ = value;
744420c9859SShuo Chen              }
745420c9859SShuo Chen              break;
746420c9859SShuo Chen            }
747420c9859SShuo Chen          }
748420c9859SShuo Chen        }
749420c9859SShuo Chen      }
750420c9859SShuo Chen
751420c9859SShuo Chen      private int bitField0_;
752420c9859SShuo Chen
753420c9859SShuo Chen      // required .MessageType type = 1;
754420c9859SShuo Chen      private muduo.rpc.proto.RpcProto.MessageType type_ = muduo.rpc.proto.RpcProto.MessageType.REQUEST;
755420c9859SShuo Chen      public boolean hasType() {
756420c9859SShuo Chen        return ((bitField0_ & 0x00000001) == 0x00000001);
757420c9859SShuo Chen      }
758420c9859SShuo Chen      public muduo.rpc.proto.RpcProto.MessageType getType() {
759420c9859SShuo Chen        return type_;
760420c9859SShuo Chen      }
761420c9859SShuo Chen      public Builder setType(muduo.rpc.proto.RpcProto.MessageType value) {
762420c9859SShuo Chen        if (value == null) {
763420c9859SShuo Chen          throw new NullPointerException();
764420c9859SShuo Chen        }
765420c9859SShuo Chen        bitField0_ |= 0x00000001;
766420c9859SShuo Chen        type_ = value;
767420c9859SShuo Chen        onChanged();
768420c9859SShuo Chen        return this;
769420c9859SShuo Chen      }
770420c9859SShuo Chen      public Builder clearType() {
771420c9859SShuo Chen        bitField0_ = (bitField0_ & ~0x00000001);
772420c9859SShuo Chen        type_ = muduo.rpc.proto.RpcProto.MessageType.REQUEST;
773420c9859SShuo Chen        onChanged();
774420c9859SShuo Chen        return this;
775420c9859SShuo Chen      }
776420c9859SShuo Chen
777420c9859SShuo Chen      // required fixed64 id = 2;
778420c9859SShuo Chen      private long id_ ;
779420c9859SShuo Chen      public boolean hasId() {
780420c9859SShuo Chen        return ((bitField0_ & 0x00000002) == 0x00000002);
781420c9859SShuo Chen      }
782420c9859SShuo Chen      public long getId() {
783420c9859SShuo Chen        return id_;
784420c9859SShuo Chen      }
785420c9859SShuo Chen      public Builder setId(long value) {
786420c9859SShuo Chen        bitField0_ |= 0x00000002;
787420c9859SShuo Chen        id_ = value;
788420c9859SShuo Chen        onChanged();
789420c9859SShuo Chen        return this;
790420c9859SShuo Chen      }
791420c9859SShuo Chen      public Builder clearId() {
792420c9859SShuo Chen        bitField0_ = (bitField0_ & ~0x00000002);
793420c9859SShuo Chen        id_ = 0L;
794420c9859SShuo Chen        onChanged();
795420c9859SShuo Chen        return this;
796420c9859SShuo Chen      }
797420c9859SShuo Chen
798420c9859SShuo Chen      // optional string service = 3;
799420c9859SShuo Chen      private Object service_ = "";
800420c9859SShuo Chen      public boolean hasService() {
801420c9859SShuo Chen        return ((bitField0_ & 0x00000004) == 0x00000004);
802420c9859SShuo Chen      }
803420c9859SShuo Chen      public String getService() {
804420c9859SShuo Chen        Object ref = service_;
805420c9859SShuo Chen        if (!(ref instanceof String)) {
806420c9859SShuo Chen          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
807420c9859SShuo Chen          service_ = s;
808420c9859SShuo Chen          return s;
809420c9859SShuo Chen        } else {
810420c9859SShuo Chen          return (String) ref;
811420c9859SShuo Chen        }
812420c9859SShuo Chen      }
813420c9859SShuo Chen      public Builder setService(String value) {
814420c9859SShuo Chen        if (value == null) {
815420c9859SShuo Chen    throw new NullPointerException();
816420c9859SShuo Chen  }
817420c9859SShuo Chen  bitField0_ |= 0x00000004;
818420c9859SShuo Chen        service_ = value;
819420c9859SShuo Chen        onChanged();
820420c9859SShuo Chen        return this;
821420c9859SShuo Chen      }
822420c9859SShuo Chen      public Builder clearService() {
823420c9859SShuo Chen        bitField0_ = (bitField0_ & ~0x00000004);
824420c9859SShuo Chen        service_ = getDefaultInstance().getService();
825420c9859SShuo Chen        onChanged();
826420c9859SShuo Chen        return this;
827420c9859SShuo Chen      }
828420c9859SShuo Chen      void setService(com.google.protobuf.ByteString value) {
829420c9859SShuo Chen        bitField0_ |= 0x00000004;
830420c9859SShuo Chen        service_ = value;
831420c9859SShuo Chen        onChanged();
832420c9859SShuo Chen      }
833420c9859SShuo Chen
834420c9859SShuo Chen      // optional string method = 4;
835420c9859SShuo Chen      private Object method_ = "";
836420c9859SShuo Chen      public boolean hasMethod() {
837420c9859SShuo Chen        return ((bitField0_ & 0x00000008) == 0x00000008);
838420c9859SShuo Chen      }
839420c9859SShuo Chen      public String getMethod() {
840420c9859SShuo Chen        Object ref = method_;
841420c9859SShuo Chen        if (!(ref instanceof String)) {
842420c9859SShuo Chen          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
843420c9859SShuo Chen          method_ = s;
844420c9859SShuo Chen          return s;
845420c9859SShuo Chen        } else {
846420c9859SShuo Chen          return (String) ref;
847420c9859SShuo Chen        }
848420c9859SShuo Chen      }
849420c9859SShuo Chen      public Builder setMethod(String value) {
850420c9859SShuo Chen        if (value == null) {
851420c9859SShuo Chen    throw new NullPointerException();
852420c9859SShuo Chen  }
853420c9859SShuo Chen  bitField0_ |= 0x00000008;
854420c9859SShuo Chen        method_ = value;
855420c9859SShuo Chen        onChanged();
856420c9859SShuo Chen        return this;
857420c9859SShuo Chen      }
858420c9859SShuo Chen      public Builder clearMethod() {
859420c9859SShuo Chen        bitField0_ = (bitField0_ & ~0x00000008);
860420c9859SShuo Chen        method_ = getDefaultInstance().getMethod();
861420c9859SShuo Chen        onChanged();
862420c9859SShuo Chen        return this;
863420c9859SShuo Chen      }
864420c9859SShuo Chen      void setMethod(com.google.protobuf.ByteString value) {
865420c9859SShuo Chen        bitField0_ |= 0x00000008;
866420c9859SShuo Chen        method_ = value;
867420c9859SShuo Chen        onChanged();
868420c9859SShuo Chen      }
869420c9859SShuo Chen
870420c9859SShuo Chen      // optional bytes request = 5;
871420c9859SShuo Chen      private com.google.protobuf.ByteString request_ = com.google.protobuf.ByteString.EMPTY;
872420c9859SShuo Chen      public boolean hasRequest() {
873420c9859SShuo Chen        return ((bitField0_ & 0x00000010) == 0x00000010);
874420c9859SShuo Chen      }
875420c9859SShuo Chen      public com.google.protobuf.ByteString getRequest() {
876420c9859SShuo Chen        return request_;
877420c9859SShuo Chen      }
878420c9859SShuo Chen      public Builder setRequest(com.google.protobuf.ByteString value) {
879420c9859SShuo Chen        if (value == null) {
880420c9859SShuo Chen    throw new NullPointerException();
881420c9859SShuo Chen  }
882420c9859SShuo Chen  bitField0_ |= 0x00000010;
883420c9859SShuo Chen        request_ = value;
884420c9859SShuo Chen        onChanged();
885420c9859SShuo Chen        return this;
886420c9859SShuo Chen      }
887420c9859SShuo Chen      public Builder clearRequest() {
888420c9859SShuo Chen        bitField0_ = (bitField0_ & ~0x00000010);
889420c9859SShuo Chen        request_ = getDefaultInstance().getRequest();
890420c9859SShuo Chen        onChanged();
891420c9859SShuo Chen        return this;
892420c9859SShuo Chen      }
893420c9859SShuo Chen
894420c9859SShuo Chen      // optional bytes response = 6;
895420c9859SShuo Chen      private com.google.protobuf.ByteString response_ = com.google.protobuf.ByteString.EMPTY;
896420c9859SShuo Chen      public boolean hasResponse() {
897420c9859SShuo Chen        return ((bitField0_ & 0x00000020) == 0x00000020);
898420c9859SShuo Chen      }
899420c9859SShuo Chen      public com.google.protobuf.ByteString getResponse() {
900420c9859SShuo Chen        return response_;
901420c9859SShuo Chen      }
902420c9859SShuo Chen      public Builder setResponse(com.google.protobuf.ByteString value) {
903420c9859SShuo Chen        if (value == null) {
904420c9859SShuo Chen    throw new NullPointerException();
905420c9859SShuo Chen  }
906420c9859SShuo Chen  bitField0_ |= 0x00000020;
907420c9859SShuo Chen        response_ = value;
908420c9859SShuo Chen        onChanged();
909420c9859SShuo Chen        return this;
910420c9859SShuo Chen      }
911420c9859SShuo Chen      public Builder clearResponse() {
912420c9859SShuo Chen        bitField0_ = (bitField0_ & ~0x00000020);
913420c9859SShuo Chen        response_ = getDefaultInstance().getResponse();
914420c9859SShuo Chen        onChanged();
915420c9859SShuo Chen        return this;
916420c9859SShuo Chen      }
917420c9859SShuo Chen
918420c9859SShuo Chen      // optional .ErrorCode error = 7;
919420c9859SShuo Chen      private muduo.rpc.proto.RpcProto.ErrorCode error_ = muduo.rpc.proto.RpcProto.ErrorCode.WRONG_PROTO;
920420c9859SShuo Chen      public boolean hasError() {
921420c9859SShuo Chen        return ((bitField0_ & 0x00000040) == 0x00000040);
922420c9859SShuo Chen      }
923420c9859SShuo Chen      public muduo.rpc.proto.RpcProto.ErrorCode getError() {
924420c9859SShuo Chen        return error_;
925420c9859SShuo Chen      }
926420c9859SShuo Chen      public Builder setError(muduo.rpc.proto.RpcProto.ErrorCode value) {
927420c9859SShuo Chen        if (value == null) {
928420c9859SShuo Chen          throw new NullPointerException();
929420c9859SShuo Chen        }
930420c9859SShuo Chen        bitField0_ |= 0x00000040;
931420c9859SShuo Chen        error_ = value;
932420c9859SShuo Chen        onChanged();
933420c9859SShuo Chen        return this;
934420c9859SShuo Chen      }
935420c9859SShuo Chen      public Builder clearError() {
936420c9859SShuo Chen        bitField0_ = (bitField0_ & ~0x00000040);
937420c9859SShuo Chen        error_ = muduo.rpc.proto.RpcProto.ErrorCode.WRONG_PROTO;
938420c9859SShuo Chen        onChanged();
939420c9859SShuo Chen        return this;
940420c9859SShuo Chen      }
941420c9859SShuo Chen
942420c9859SShuo Chen      // @@protoc_insertion_point(builder_scope:RpcMessage)
943420c9859SShuo Chen    }
944420c9859SShuo Chen
945420c9859SShuo Chen    static {
946420c9859SShuo Chen      defaultInstance = new RpcMessage(true);
947420c9859SShuo Chen      defaultInstance.initFields();
948420c9859SShuo Chen    }
949420c9859SShuo Chen
950420c9859SShuo Chen    // @@protoc_insertion_point(class_scope:RpcMessage)
951420c9859SShuo Chen  }
952420c9859SShuo Chen
953420c9859SShuo Chen  private static com.google.protobuf.Descriptors.Descriptor
954420c9859SShuo Chen    internal_static_RpcMessage_descriptor;
955420c9859SShuo Chen  private static
956420c9859SShuo Chen    com.google.protobuf.GeneratedMessage.FieldAccessorTable
957420c9859SShuo Chen      internal_static_RpcMessage_fieldAccessorTable;
958420c9859SShuo Chen
959420c9859SShuo Chen  public static com.google.protobuf.Descriptors.FileDescriptor
960420c9859SShuo Chen      getDescriptor() {
961420c9859SShuo Chen    return descriptor;
962420c9859SShuo Chen  }
963420c9859SShuo Chen  private static com.google.protobuf.Descriptors.FileDescriptor
964420c9859SShuo Chen      descriptor;
965420c9859SShuo Chen  static {
966420c9859SShuo Chen    java.lang.String[] descriptorData = {
967420c9859SShuo Chen      "\n\trpc.proto\"\223\001\n\nRpcMessage\022\032\n\004type\030\001 \002(\016" +
968420c9859SShuo Chen      "2\014.MessageType\022\n\n\002id\030\002 \002(\006\022\017\n\007service\030\003 " +
969420c9859SShuo Chen      "\001(\t\022\016\n\006method\030\004 \001(\t\022\017\n\007request\030\005 \001(\014\022\020\n\010" +
970420c9859SShuo Chen      "response\030\006 \001(\014\022\031\n\005error\030\007 \001(\0162\n.ErrorCod" +
971420c9859SShuo Chen      "e*3\n\013MessageType\022\013\n\007REQUEST\020\001\022\014\n\010RESPONS" +
972420c9859SShuo Chen      "E\020\002\022\t\n\005ERROR\020\003*f\n\tErrorCode\022\017\n\013WRONG_PRO" +
973420c9859SShuo Chen      "TO\020\001\022\016\n\nNO_SERVICE\020\002\022\r\n\tNO_METHOD\020\003\022\023\n\017I" +
974420c9859SShuo Chen      "NVALID_REQUEST\020\004\022\024\n\020INVALID_RESPONSE\020\005B\033" +
975420c9859SShuo Chen      "\n\017muduo.rpc.protoB\010RpcProto"
976420c9859SShuo Chen    };
977420c9859SShuo Chen    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
978420c9859SShuo Chen      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
979420c9859SShuo Chen        public com.google.protobuf.ExtensionRegistry assignDescriptors(
980420c9859SShuo Chen            com.google.protobuf.Descriptors.FileDescriptor root) {
981420c9859SShuo Chen          descriptor = root;
982420c9859SShuo Chen          internal_static_RpcMessage_descriptor =
983420c9859SShuo Chen            getDescriptor().getMessageTypes().get(0);
984420c9859SShuo Chen          internal_static_RpcMessage_fieldAccessorTable = new
985420c9859SShuo Chen            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
986420c9859SShuo Chen              internal_static_RpcMessage_descriptor,
987420c9859SShuo Chen              new java.lang.String[] { "Type", "Id", "Service", "Method", "Request", "Response", "Error", },
988420c9859SShuo Chen              muduo.rpc.proto.RpcProto.RpcMessage.class,
989420c9859SShuo Chen              muduo.rpc.proto.RpcProto.RpcMessage.Builder.class);
990420c9859SShuo Chen          return null;
991420c9859SShuo Chen        }
992420c9859SShuo Chen      };
993420c9859SShuo Chen    com.google.protobuf.Descriptors.FileDescriptor
994420c9859SShuo Chen      .internalBuildGeneratedFileFrom(descriptorData,
995420c9859SShuo Chen        new com.google.protobuf.Descriptors.FileDescriptor[] {
996420c9859SShuo Chen        }, assigner);
997420c9859SShuo Chen  }
998420c9859SShuo Chen
999420c9859SShuo Chen  // @@protoc_insertion_point(outer_class_scope)
1000420c9859SShuo Chen}
1001