PageRenderTime 42ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/java/src/main/java/com/googlecode/protobuf/socketrpc/SocketRpcProtos.java

http://protobuf-socket-rpc.googlecode.com/
Java | 1295 lines | 1138 code | 104 blank | 53 comment | 146 complexity | 09ab02e66c287e9f0b77a91a74cd1fe1 MD5 | raw file
  1. // Copyright (c) 2011 Shardul Deo
  2. //
  3. // Permission is hereby granted, free of charge, to any person obtaining a copy
  4. // of this software and associated documentation files (the "Software"), to deal
  5. // in the Software without restriction, including without limitation the rights
  6. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. // copies of the Software, and to permit persons to whom the Software is
  8. // furnished to do so, subject to the following conditions:
  9. //
  10. // The above copyright notice and this permission notice shall be included in
  11. // all copies or substantial portions of the Software.
  12. //
  13. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. // THE SOFTWARE.
  20. //
  21. // Generated by the protocol buffer compiler. DO NOT EDIT!
  22. // source: proto/rpc.proto
  23. package com.googlecode.protobuf.socketrpc;
  24. public final class SocketRpcProtos {
  25. private SocketRpcProtos() {}
  26. public static void registerAllExtensions(
  27. com.google.protobuf.ExtensionRegistry registry) {
  28. }
  29. public enum ErrorReason
  30. implements com.google.protobuf.ProtocolMessageEnum {
  31. BAD_REQUEST_DATA(0, 0),
  32. BAD_REQUEST_PROTO(1, 1),
  33. SERVICE_NOT_FOUND(2, 2),
  34. METHOD_NOT_FOUND(3, 3),
  35. RPC_ERROR(4, 4),
  36. RPC_FAILED(5, 5),
  37. INVALID_REQUEST_PROTO(6, 6),
  38. BAD_RESPONSE_PROTO(7, 7),
  39. UNKNOWN_HOST(8, 8),
  40. IO_ERROR(9, 9),
  41. ;
  42. public static final int BAD_REQUEST_DATA_VALUE = 0;
  43. public static final int BAD_REQUEST_PROTO_VALUE = 1;
  44. public static final int SERVICE_NOT_FOUND_VALUE = 2;
  45. public static final int METHOD_NOT_FOUND_VALUE = 3;
  46. public static final int RPC_ERROR_VALUE = 4;
  47. public static final int RPC_FAILED_VALUE = 5;
  48. public static final int INVALID_REQUEST_PROTO_VALUE = 6;
  49. public static final int BAD_RESPONSE_PROTO_VALUE = 7;
  50. public static final int UNKNOWN_HOST_VALUE = 8;
  51. public static final int IO_ERROR_VALUE = 9;
  52. public final int getNumber() { return value; }
  53. public static ErrorReason valueOf(int value) {
  54. switch (value) {
  55. case 0: return BAD_REQUEST_DATA;
  56. case 1: return BAD_REQUEST_PROTO;
  57. case 2: return SERVICE_NOT_FOUND;
  58. case 3: return METHOD_NOT_FOUND;
  59. case 4: return RPC_ERROR;
  60. case 5: return RPC_FAILED;
  61. case 6: return INVALID_REQUEST_PROTO;
  62. case 7: return BAD_RESPONSE_PROTO;
  63. case 8: return UNKNOWN_HOST;
  64. case 9: return IO_ERROR;
  65. default: return null;
  66. }
  67. }
  68. public static com.google.protobuf.Internal.EnumLiteMap<ErrorReason>
  69. internalGetValueMap() {
  70. return internalValueMap;
  71. }
  72. private static com.google.protobuf.Internal.EnumLiteMap<ErrorReason>
  73. internalValueMap =
  74. new com.google.protobuf.Internal.EnumLiteMap<ErrorReason>() {
  75. public ErrorReason findValueByNumber(int number) {
  76. return ErrorReason.valueOf(number);
  77. }
  78. };
  79. public final com.google.protobuf.Descriptors.EnumValueDescriptor
  80. getValueDescriptor() {
  81. return getDescriptor().getValues().get(index);
  82. }
  83. public final com.google.protobuf.Descriptors.EnumDescriptor
  84. getDescriptorForType() {
  85. return getDescriptor();
  86. }
  87. public static final com.google.protobuf.Descriptors.EnumDescriptor
  88. getDescriptor() {
  89. return com.googlecode.protobuf.socketrpc.SocketRpcProtos.getDescriptor().getEnumTypes().get(0);
  90. }
  91. private static final ErrorReason[] VALUES = {
  92. BAD_REQUEST_DATA, BAD_REQUEST_PROTO, SERVICE_NOT_FOUND, METHOD_NOT_FOUND, RPC_ERROR, RPC_FAILED, INVALID_REQUEST_PROTO, BAD_RESPONSE_PROTO, UNKNOWN_HOST, IO_ERROR,
  93. };
  94. public static ErrorReason valueOf(
  95. com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
  96. if (desc.getType() != getDescriptor()) {
  97. throw new java.lang.IllegalArgumentException(
  98. "EnumValueDescriptor is not for this type.");
  99. }
  100. return VALUES[desc.getIndex()];
  101. }
  102. private final int index;
  103. private final int value;
  104. private ErrorReason(int index, int value) {
  105. this.index = index;
  106. this.value = value;
  107. }
  108. // @@protoc_insertion_point(enum_scope:protobuf.socketrpc.ErrorReason)
  109. }
  110. public interface RequestOrBuilder
  111. extends com.google.protobuf.MessageOrBuilder {
  112. // required string service_name = 1;
  113. boolean hasServiceName();
  114. String getServiceName();
  115. // required string method_name = 2;
  116. boolean hasMethodName();
  117. String getMethodName();
  118. // required bytes request_proto = 3;
  119. boolean hasRequestProto();
  120. com.google.protobuf.ByteString getRequestProto();
  121. }
  122. public static final class Request extends
  123. com.google.protobuf.GeneratedMessage
  124. implements RequestOrBuilder {
  125. // Use Request.newBuilder() to construct.
  126. private Request(Builder builder) {
  127. super(builder);
  128. }
  129. private Request(boolean noInit) {}
  130. private static final Request defaultInstance;
  131. public static Request getDefaultInstance() {
  132. return defaultInstance;
  133. }
  134. public Request getDefaultInstanceForType() {
  135. return defaultInstance;
  136. }
  137. public static final com.google.protobuf.Descriptors.Descriptor
  138. getDescriptor() {
  139. return com.googlecode.protobuf.socketrpc.SocketRpcProtos.internal_static_protobuf_socketrpc_Request_descriptor;
  140. }
  141. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  142. internalGetFieldAccessorTable() {
  143. return com.googlecode.protobuf.socketrpc.SocketRpcProtos.internal_static_protobuf_socketrpc_Request_fieldAccessorTable;
  144. }
  145. private int bitField0_;
  146. // required string service_name = 1;
  147. public static final int SERVICE_NAME_FIELD_NUMBER = 1;
  148. private Object serviceName_;
  149. public boolean hasServiceName() {
  150. return ((bitField0_ & 0x00000001) == 0x00000001);
  151. }
  152. public String getServiceName() {
  153. Object ref = serviceName_;
  154. if (ref instanceof String) {
  155. return (String) ref;
  156. } else {
  157. com.google.protobuf.ByteString bs =
  158. (com.google.protobuf.ByteString) ref;
  159. String s = bs.toStringUtf8();
  160. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  161. serviceName_ = s;
  162. }
  163. return s;
  164. }
  165. }
  166. private com.google.protobuf.ByteString getServiceNameBytes() {
  167. Object ref = serviceName_;
  168. if (ref instanceof String) {
  169. com.google.protobuf.ByteString b =
  170. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  171. serviceName_ = b;
  172. return b;
  173. } else {
  174. return (com.google.protobuf.ByteString) ref;
  175. }
  176. }
  177. // required string method_name = 2;
  178. public static final int METHOD_NAME_FIELD_NUMBER = 2;
  179. private Object methodName_;
  180. public boolean hasMethodName() {
  181. return ((bitField0_ & 0x00000002) == 0x00000002);
  182. }
  183. public String getMethodName() {
  184. Object ref = methodName_;
  185. if (ref instanceof String) {
  186. return (String) ref;
  187. } else {
  188. com.google.protobuf.ByteString bs =
  189. (com.google.protobuf.ByteString) ref;
  190. String s = bs.toStringUtf8();
  191. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  192. methodName_ = s;
  193. }
  194. return s;
  195. }
  196. }
  197. private com.google.protobuf.ByteString getMethodNameBytes() {
  198. Object ref = methodName_;
  199. if (ref instanceof String) {
  200. com.google.protobuf.ByteString b =
  201. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  202. methodName_ = b;
  203. return b;
  204. } else {
  205. return (com.google.protobuf.ByteString) ref;
  206. }
  207. }
  208. // required bytes request_proto = 3;
  209. public static final int REQUEST_PROTO_FIELD_NUMBER = 3;
  210. private com.google.protobuf.ByteString requestProto_;
  211. public boolean hasRequestProto() {
  212. return ((bitField0_ & 0x00000004) == 0x00000004);
  213. }
  214. public com.google.protobuf.ByteString getRequestProto() {
  215. return requestProto_;
  216. }
  217. private void initFields() {
  218. serviceName_ = "";
  219. methodName_ = "";
  220. requestProto_ = com.google.protobuf.ByteString.EMPTY;
  221. }
  222. private byte memoizedIsInitialized = -1;
  223. public final boolean isInitialized() {
  224. byte isInitialized = memoizedIsInitialized;
  225. if (isInitialized != -1) return isInitialized == 1;
  226. if (!hasServiceName()) {
  227. memoizedIsInitialized = 0;
  228. return false;
  229. }
  230. if (!hasMethodName()) {
  231. memoizedIsInitialized = 0;
  232. return false;
  233. }
  234. if (!hasRequestProto()) {
  235. memoizedIsInitialized = 0;
  236. return false;
  237. }
  238. memoizedIsInitialized = 1;
  239. return true;
  240. }
  241. public void writeTo(com.google.protobuf.CodedOutputStream output)
  242. throws java.io.IOException {
  243. getSerializedSize();
  244. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  245. output.writeBytes(1, getServiceNameBytes());
  246. }
  247. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  248. output.writeBytes(2, getMethodNameBytes());
  249. }
  250. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  251. output.writeBytes(3, requestProto_);
  252. }
  253. getUnknownFields().writeTo(output);
  254. }
  255. private int memoizedSerializedSize = -1;
  256. public int getSerializedSize() {
  257. int size = memoizedSerializedSize;
  258. if (size != -1) return size;
  259. size = 0;
  260. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  261. size += com.google.protobuf.CodedOutputStream
  262. .computeBytesSize(1, getServiceNameBytes());
  263. }
  264. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  265. size += com.google.protobuf.CodedOutputStream
  266. .computeBytesSize(2, getMethodNameBytes());
  267. }
  268. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  269. size += com.google.protobuf.CodedOutputStream
  270. .computeBytesSize(3, requestProto_);
  271. }
  272. size += getUnknownFields().getSerializedSize();
  273. memoizedSerializedSize = size;
  274. return size;
  275. }
  276. @java.lang.Override
  277. protected Object writeReplace() throws java.io.ObjectStreamException {
  278. return super.writeReplace();
  279. }
  280. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request parseFrom(
  281. com.google.protobuf.ByteString data)
  282. throws com.google.protobuf.InvalidProtocolBufferException {
  283. return newBuilder().mergeFrom(data).buildParsed();
  284. }
  285. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request parseFrom(
  286. com.google.protobuf.ByteString data,
  287. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  288. throws com.google.protobuf.InvalidProtocolBufferException {
  289. return newBuilder().mergeFrom(data, extensionRegistry)
  290. .buildParsed();
  291. }
  292. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request parseFrom(byte[] data)
  293. throws com.google.protobuf.InvalidProtocolBufferException {
  294. return newBuilder().mergeFrom(data).buildParsed();
  295. }
  296. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request parseFrom(
  297. byte[] data,
  298. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  299. throws com.google.protobuf.InvalidProtocolBufferException {
  300. return newBuilder().mergeFrom(data, extensionRegistry)
  301. .buildParsed();
  302. }
  303. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request parseFrom(java.io.InputStream input)
  304. throws java.io.IOException {
  305. return newBuilder().mergeFrom(input).buildParsed();
  306. }
  307. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request parseFrom(
  308. java.io.InputStream input,
  309. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  310. throws java.io.IOException {
  311. return newBuilder().mergeFrom(input, extensionRegistry)
  312. .buildParsed();
  313. }
  314. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request parseDelimitedFrom(java.io.InputStream input)
  315. throws java.io.IOException {
  316. Builder builder = newBuilder();
  317. if (builder.mergeDelimitedFrom(input)) {
  318. return builder.buildParsed();
  319. } else {
  320. return null;
  321. }
  322. }
  323. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request parseDelimitedFrom(
  324. java.io.InputStream input,
  325. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  326. throws java.io.IOException {
  327. Builder builder = newBuilder();
  328. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  329. return builder.buildParsed();
  330. } else {
  331. return null;
  332. }
  333. }
  334. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request parseFrom(
  335. com.google.protobuf.CodedInputStream input)
  336. throws java.io.IOException {
  337. return newBuilder().mergeFrom(input).buildParsed();
  338. }
  339. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request parseFrom(
  340. com.google.protobuf.CodedInputStream input,
  341. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  342. throws java.io.IOException {
  343. return newBuilder().mergeFrom(input, extensionRegistry)
  344. .buildParsed();
  345. }
  346. public static Builder newBuilder() { return Builder.create(); }
  347. public Builder newBuilderForType() { return newBuilder(); }
  348. public static Builder newBuilder(com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request prototype) {
  349. return newBuilder().mergeFrom(prototype);
  350. }
  351. public Builder toBuilder() { return newBuilder(this); }
  352. @java.lang.Override
  353. protected Builder newBuilderForType(
  354. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  355. Builder builder = new Builder(parent);
  356. return builder;
  357. }
  358. public static final class Builder extends
  359. com.google.protobuf.GeneratedMessage.Builder<Builder>
  360. implements com.googlecode.protobuf.socketrpc.SocketRpcProtos.RequestOrBuilder {
  361. public static final com.google.protobuf.Descriptors.Descriptor
  362. getDescriptor() {
  363. return com.googlecode.protobuf.socketrpc.SocketRpcProtos.internal_static_protobuf_socketrpc_Request_descriptor;
  364. }
  365. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  366. internalGetFieldAccessorTable() {
  367. return com.googlecode.protobuf.socketrpc.SocketRpcProtos.internal_static_protobuf_socketrpc_Request_fieldAccessorTable;
  368. }
  369. // Construct using com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request.newBuilder()
  370. private Builder() {
  371. maybeForceBuilderInitialization();
  372. }
  373. private Builder(BuilderParent parent) {
  374. super(parent);
  375. maybeForceBuilderInitialization();
  376. }
  377. private void maybeForceBuilderInitialization() {
  378. if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
  379. }
  380. }
  381. private static Builder create() {
  382. return new Builder();
  383. }
  384. public Builder clear() {
  385. super.clear();
  386. serviceName_ = "";
  387. bitField0_ = (bitField0_ & ~0x00000001);
  388. methodName_ = "";
  389. bitField0_ = (bitField0_ & ~0x00000002);
  390. requestProto_ = com.google.protobuf.ByteString.EMPTY;
  391. bitField0_ = (bitField0_ & ~0x00000004);
  392. return this;
  393. }
  394. public Builder clone() {
  395. return create().mergeFrom(buildPartial());
  396. }
  397. public com.google.protobuf.Descriptors.Descriptor
  398. getDescriptorForType() {
  399. return com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request.getDescriptor();
  400. }
  401. public com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request getDefaultInstanceForType() {
  402. return com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request.getDefaultInstance();
  403. }
  404. public com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request build() {
  405. com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request result = buildPartial();
  406. if (!result.isInitialized()) {
  407. throw newUninitializedMessageException(result);
  408. }
  409. return result;
  410. }
  411. private com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request buildParsed()
  412. throws com.google.protobuf.InvalidProtocolBufferException {
  413. com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request result = buildPartial();
  414. if (!result.isInitialized()) {
  415. throw newUninitializedMessageException(
  416. result).asInvalidProtocolBufferException();
  417. }
  418. return result;
  419. }
  420. public com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request buildPartial() {
  421. com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request result = new com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request(this);
  422. int from_bitField0_ = bitField0_;
  423. int to_bitField0_ = 0;
  424. if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
  425. to_bitField0_ |= 0x00000001;
  426. }
  427. result.serviceName_ = serviceName_;
  428. if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
  429. to_bitField0_ |= 0x00000002;
  430. }
  431. result.methodName_ = methodName_;
  432. if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
  433. to_bitField0_ |= 0x00000004;
  434. }
  435. result.requestProto_ = requestProto_;
  436. result.bitField0_ = to_bitField0_;
  437. onBuilt();
  438. return result;
  439. }
  440. public Builder mergeFrom(com.google.protobuf.Message other) {
  441. if (other instanceof com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request) {
  442. return mergeFrom((com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request)other);
  443. } else {
  444. super.mergeFrom(other);
  445. return this;
  446. }
  447. }
  448. public Builder mergeFrom(com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request other) {
  449. if (other == com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request.getDefaultInstance()) return this;
  450. if (other.hasServiceName()) {
  451. setServiceName(other.getServiceName());
  452. }
  453. if (other.hasMethodName()) {
  454. setMethodName(other.getMethodName());
  455. }
  456. if (other.hasRequestProto()) {
  457. setRequestProto(other.getRequestProto());
  458. }
  459. this.mergeUnknownFields(other.getUnknownFields());
  460. return this;
  461. }
  462. public final boolean isInitialized() {
  463. if (!hasServiceName()) {
  464. return false;
  465. }
  466. if (!hasMethodName()) {
  467. return false;
  468. }
  469. if (!hasRequestProto()) {
  470. return false;
  471. }
  472. return true;
  473. }
  474. public Builder mergeFrom(
  475. com.google.protobuf.CodedInputStream input,
  476. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  477. throws java.io.IOException {
  478. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  479. com.google.protobuf.UnknownFieldSet.newBuilder(
  480. this.getUnknownFields());
  481. while (true) {
  482. int tag = input.readTag();
  483. switch (tag) {
  484. case 0:
  485. this.setUnknownFields(unknownFields.build());
  486. onChanged();
  487. return this;
  488. default: {
  489. if (!parseUnknownField(input, unknownFields,
  490. extensionRegistry, tag)) {
  491. this.setUnknownFields(unknownFields.build());
  492. onChanged();
  493. return this;
  494. }
  495. break;
  496. }
  497. case 10: {
  498. bitField0_ |= 0x00000001;
  499. serviceName_ = input.readBytes();
  500. break;
  501. }
  502. case 18: {
  503. bitField0_ |= 0x00000002;
  504. methodName_ = input.readBytes();
  505. break;
  506. }
  507. case 26: {
  508. bitField0_ |= 0x00000004;
  509. requestProto_ = input.readBytes();
  510. break;
  511. }
  512. }
  513. }
  514. }
  515. private int bitField0_;
  516. // required string service_name = 1;
  517. private Object serviceName_ = "";
  518. public boolean hasServiceName() {
  519. return ((bitField0_ & 0x00000001) == 0x00000001);
  520. }
  521. public String getServiceName() {
  522. Object ref = serviceName_;
  523. if (!(ref instanceof String)) {
  524. String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
  525. serviceName_ = s;
  526. return s;
  527. } else {
  528. return (String) ref;
  529. }
  530. }
  531. public Builder setServiceName(String value) {
  532. if (value == null) {
  533. throw new NullPointerException();
  534. }
  535. bitField0_ |= 0x00000001;
  536. serviceName_ = value;
  537. onChanged();
  538. return this;
  539. }
  540. public Builder clearServiceName() {
  541. bitField0_ = (bitField0_ & ~0x00000001);
  542. serviceName_ = getDefaultInstance().getServiceName();
  543. onChanged();
  544. return this;
  545. }
  546. void setServiceName(com.google.protobuf.ByteString value) {
  547. bitField0_ |= 0x00000001;
  548. serviceName_ = value;
  549. onChanged();
  550. }
  551. // required string method_name = 2;
  552. private Object methodName_ = "";
  553. public boolean hasMethodName() {
  554. return ((bitField0_ & 0x00000002) == 0x00000002);
  555. }
  556. public String getMethodName() {
  557. Object ref = methodName_;
  558. if (!(ref instanceof String)) {
  559. String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
  560. methodName_ = s;
  561. return s;
  562. } else {
  563. return (String) ref;
  564. }
  565. }
  566. public Builder setMethodName(String value) {
  567. if (value == null) {
  568. throw new NullPointerException();
  569. }
  570. bitField0_ |= 0x00000002;
  571. methodName_ = value;
  572. onChanged();
  573. return this;
  574. }
  575. public Builder clearMethodName() {
  576. bitField0_ = (bitField0_ & ~0x00000002);
  577. methodName_ = getDefaultInstance().getMethodName();
  578. onChanged();
  579. return this;
  580. }
  581. void setMethodName(com.google.protobuf.ByteString value) {
  582. bitField0_ |= 0x00000002;
  583. methodName_ = value;
  584. onChanged();
  585. }
  586. // required bytes request_proto = 3;
  587. private com.google.protobuf.ByteString requestProto_ = com.google.protobuf.ByteString.EMPTY;
  588. public boolean hasRequestProto() {
  589. return ((bitField0_ & 0x00000004) == 0x00000004);
  590. }
  591. public com.google.protobuf.ByteString getRequestProto() {
  592. return requestProto_;
  593. }
  594. public Builder setRequestProto(com.google.protobuf.ByteString value) {
  595. if (value == null) {
  596. throw new NullPointerException();
  597. }
  598. bitField0_ |= 0x00000004;
  599. requestProto_ = value;
  600. onChanged();
  601. return this;
  602. }
  603. public Builder clearRequestProto() {
  604. bitField0_ = (bitField0_ & ~0x00000004);
  605. requestProto_ = getDefaultInstance().getRequestProto();
  606. onChanged();
  607. return this;
  608. }
  609. // @@protoc_insertion_point(builder_scope:protobuf.socketrpc.Request)
  610. }
  611. static {
  612. defaultInstance = new Request(true);
  613. defaultInstance.initFields();
  614. }
  615. // @@protoc_insertion_point(class_scope:protobuf.socketrpc.Request)
  616. }
  617. public interface ResponseOrBuilder
  618. extends com.google.protobuf.MessageOrBuilder {
  619. // optional bytes response_proto = 1;
  620. boolean hasResponseProto();
  621. com.google.protobuf.ByteString getResponseProto();
  622. // optional string error = 2;
  623. boolean hasError();
  624. String getError();
  625. // optional bool callback = 3 [default = false];
  626. boolean hasCallback();
  627. boolean getCallback();
  628. // optional .protobuf.socketrpc.ErrorReason error_reason = 4;
  629. boolean hasErrorReason();
  630. com.googlecode.protobuf.socketrpc.SocketRpcProtos.ErrorReason getErrorReason();
  631. }
  632. public static final class Response extends
  633. com.google.protobuf.GeneratedMessage
  634. implements ResponseOrBuilder {
  635. // Use Response.newBuilder() to construct.
  636. private Response(Builder builder) {
  637. super(builder);
  638. }
  639. private Response(boolean noInit) {}
  640. private static final Response defaultInstance;
  641. public static Response getDefaultInstance() {
  642. return defaultInstance;
  643. }
  644. public Response getDefaultInstanceForType() {
  645. return defaultInstance;
  646. }
  647. public static final com.google.protobuf.Descriptors.Descriptor
  648. getDescriptor() {
  649. return com.googlecode.protobuf.socketrpc.SocketRpcProtos.internal_static_protobuf_socketrpc_Response_descriptor;
  650. }
  651. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  652. internalGetFieldAccessorTable() {
  653. return com.googlecode.protobuf.socketrpc.SocketRpcProtos.internal_static_protobuf_socketrpc_Response_fieldAccessorTable;
  654. }
  655. private int bitField0_;
  656. // optional bytes response_proto = 1;
  657. public static final int RESPONSE_PROTO_FIELD_NUMBER = 1;
  658. private com.google.protobuf.ByteString responseProto_;
  659. public boolean hasResponseProto() {
  660. return ((bitField0_ & 0x00000001) == 0x00000001);
  661. }
  662. public com.google.protobuf.ByteString getResponseProto() {
  663. return responseProto_;
  664. }
  665. // optional string error = 2;
  666. public static final int ERROR_FIELD_NUMBER = 2;
  667. private Object error_;
  668. public boolean hasError() {
  669. return ((bitField0_ & 0x00000002) == 0x00000002);
  670. }
  671. public String getError() {
  672. Object ref = error_;
  673. if (ref instanceof String) {
  674. return (String) ref;
  675. } else {
  676. com.google.protobuf.ByteString bs =
  677. (com.google.protobuf.ByteString) ref;
  678. String s = bs.toStringUtf8();
  679. if (com.google.protobuf.Internal.isValidUtf8(bs)) {
  680. error_ = s;
  681. }
  682. return s;
  683. }
  684. }
  685. private com.google.protobuf.ByteString getErrorBytes() {
  686. Object ref = error_;
  687. if (ref instanceof String) {
  688. com.google.protobuf.ByteString b =
  689. com.google.protobuf.ByteString.copyFromUtf8((String) ref);
  690. error_ = b;
  691. return b;
  692. } else {
  693. return (com.google.protobuf.ByteString) ref;
  694. }
  695. }
  696. // optional bool callback = 3 [default = false];
  697. public static final int CALLBACK_FIELD_NUMBER = 3;
  698. private boolean callback_;
  699. public boolean hasCallback() {
  700. return ((bitField0_ & 0x00000004) == 0x00000004);
  701. }
  702. public boolean getCallback() {
  703. return callback_;
  704. }
  705. // optional .protobuf.socketrpc.ErrorReason error_reason = 4;
  706. public static final int ERROR_REASON_FIELD_NUMBER = 4;
  707. private com.googlecode.protobuf.socketrpc.SocketRpcProtos.ErrorReason errorReason_;
  708. public boolean hasErrorReason() {
  709. return ((bitField0_ & 0x00000008) == 0x00000008);
  710. }
  711. public com.googlecode.protobuf.socketrpc.SocketRpcProtos.ErrorReason getErrorReason() {
  712. return errorReason_;
  713. }
  714. private void initFields() {
  715. responseProto_ = com.google.protobuf.ByteString.EMPTY;
  716. error_ = "";
  717. callback_ = false;
  718. errorReason_ = com.googlecode.protobuf.socketrpc.SocketRpcProtos.ErrorReason.BAD_REQUEST_DATA;
  719. }
  720. private byte memoizedIsInitialized = -1;
  721. public final boolean isInitialized() {
  722. byte isInitialized = memoizedIsInitialized;
  723. if (isInitialized != -1) return isInitialized == 1;
  724. memoizedIsInitialized = 1;
  725. return true;
  726. }
  727. public void writeTo(com.google.protobuf.CodedOutputStream output)
  728. throws java.io.IOException {
  729. getSerializedSize();
  730. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  731. output.writeBytes(1, responseProto_);
  732. }
  733. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  734. output.writeBytes(2, getErrorBytes());
  735. }
  736. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  737. output.writeBool(3, callback_);
  738. }
  739. if (((bitField0_ & 0x00000008) == 0x00000008)) {
  740. output.writeEnum(4, errorReason_.getNumber());
  741. }
  742. getUnknownFields().writeTo(output);
  743. }
  744. private int memoizedSerializedSize = -1;
  745. public int getSerializedSize() {
  746. int size = memoizedSerializedSize;
  747. if (size != -1) return size;
  748. size = 0;
  749. if (((bitField0_ & 0x00000001) == 0x00000001)) {
  750. size += com.google.protobuf.CodedOutputStream
  751. .computeBytesSize(1, responseProto_);
  752. }
  753. if (((bitField0_ & 0x00000002) == 0x00000002)) {
  754. size += com.google.protobuf.CodedOutputStream
  755. .computeBytesSize(2, getErrorBytes());
  756. }
  757. if (((bitField0_ & 0x00000004) == 0x00000004)) {
  758. size += com.google.protobuf.CodedOutputStream
  759. .computeBoolSize(3, callback_);
  760. }
  761. if (((bitField0_ & 0x00000008) == 0x00000008)) {
  762. size += com.google.protobuf.CodedOutputStream
  763. .computeEnumSize(4, errorReason_.getNumber());
  764. }
  765. size += getUnknownFields().getSerializedSize();
  766. memoizedSerializedSize = size;
  767. return size;
  768. }
  769. @java.lang.Override
  770. protected Object writeReplace() throws java.io.ObjectStreamException {
  771. return super.writeReplace();
  772. }
  773. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response parseFrom(
  774. com.google.protobuf.ByteString data)
  775. throws com.google.protobuf.InvalidProtocolBufferException {
  776. return newBuilder().mergeFrom(data).buildParsed();
  777. }
  778. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response parseFrom(
  779. com.google.protobuf.ByteString data,
  780. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  781. throws com.google.protobuf.InvalidProtocolBufferException {
  782. return newBuilder().mergeFrom(data, extensionRegistry)
  783. .buildParsed();
  784. }
  785. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response parseFrom(byte[] data)
  786. throws com.google.protobuf.InvalidProtocolBufferException {
  787. return newBuilder().mergeFrom(data).buildParsed();
  788. }
  789. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response parseFrom(
  790. byte[] data,
  791. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  792. throws com.google.protobuf.InvalidProtocolBufferException {
  793. return newBuilder().mergeFrom(data, extensionRegistry)
  794. .buildParsed();
  795. }
  796. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response parseFrom(java.io.InputStream input)
  797. throws java.io.IOException {
  798. return newBuilder().mergeFrom(input).buildParsed();
  799. }
  800. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response parseFrom(
  801. java.io.InputStream input,
  802. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  803. throws java.io.IOException {
  804. return newBuilder().mergeFrom(input, extensionRegistry)
  805. .buildParsed();
  806. }
  807. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response parseDelimitedFrom(java.io.InputStream input)
  808. throws java.io.IOException {
  809. Builder builder = newBuilder();
  810. if (builder.mergeDelimitedFrom(input)) {
  811. return builder.buildParsed();
  812. } else {
  813. return null;
  814. }
  815. }
  816. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response parseDelimitedFrom(
  817. java.io.InputStream input,
  818. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  819. throws java.io.IOException {
  820. Builder builder = newBuilder();
  821. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  822. return builder.buildParsed();
  823. } else {
  824. return null;
  825. }
  826. }
  827. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response parseFrom(
  828. com.google.protobuf.CodedInputStream input)
  829. throws java.io.IOException {
  830. return newBuilder().mergeFrom(input).buildParsed();
  831. }
  832. public static com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response parseFrom(
  833. com.google.protobuf.CodedInputStream input,
  834. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  835. throws java.io.IOException {
  836. return newBuilder().mergeFrom(input, extensionRegistry)
  837. .buildParsed();
  838. }
  839. public static Builder newBuilder() { return Builder.create(); }
  840. public Builder newBuilderForType() { return newBuilder(); }
  841. public static Builder newBuilder(com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response prototype) {
  842. return newBuilder().mergeFrom(prototype);
  843. }
  844. public Builder toBuilder() { return newBuilder(this); }
  845. @java.lang.Override
  846. protected Builder newBuilderForType(
  847. com.google.protobuf.GeneratedMessage.BuilderParent parent) {
  848. Builder builder = new Builder(parent);
  849. return builder;
  850. }
  851. public static final class Builder extends
  852. com.google.protobuf.GeneratedMessage.Builder<Builder>
  853. implements com.googlecode.protobuf.socketrpc.SocketRpcProtos.ResponseOrBuilder {
  854. public static final com.google.protobuf.Descriptors.Descriptor
  855. getDescriptor() {
  856. return com.googlecode.protobuf.socketrpc.SocketRpcProtos.internal_static_protobuf_socketrpc_Response_descriptor;
  857. }
  858. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  859. internalGetFieldAccessorTable() {
  860. return com.googlecode.protobuf.socketrpc.SocketRpcProtos.internal_static_protobuf_socketrpc_Response_fieldAccessorTable;
  861. }
  862. // Construct using com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response.newBuilder()
  863. private Builder() {
  864. maybeForceBuilderInitialization();
  865. }
  866. private Builder(BuilderParent parent) {
  867. super(parent);
  868. maybeForceBuilderInitialization();
  869. }
  870. private void maybeForceBuilderInitialization() {
  871. if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
  872. }
  873. }
  874. private static Builder create() {
  875. return new Builder();
  876. }
  877. public Builder clear() {
  878. super.clear();
  879. responseProto_ = com.google.protobuf.ByteString.EMPTY;
  880. bitField0_ = (bitField0_ & ~0x00000001);
  881. error_ = "";
  882. bitField0_ = (bitField0_ & ~0x00000002);
  883. callback_ = false;
  884. bitField0_ = (bitField0_ & ~0x00000004);
  885. errorReason_ = com.googlecode.protobuf.socketrpc.SocketRpcProtos.ErrorReason.BAD_REQUEST_DATA;
  886. bitField0_ = (bitField0_ & ~0x00000008);
  887. return this;
  888. }
  889. public Builder clone() {
  890. return create().mergeFrom(buildPartial());
  891. }
  892. public com.google.protobuf.Descriptors.Descriptor
  893. getDescriptorForType() {
  894. return com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response.getDescriptor();
  895. }
  896. public com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response getDefaultInstanceForType() {
  897. return com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response.getDefaultInstance();
  898. }
  899. public com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response build() {
  900. com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response result = buildPartial();
  901. if (!result.isInitialized()) {
  902. throw newUninitializedMessageException(result);
  903. }
  904. return result;
  905. }
  906. private com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response buildParsed()
  907. throws com.google.protobuf.InvalidProtocolBufferException {
  908. com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response result = buildPartial();
  909. if (!result.isInitialized()) {
  910. throw newUninitializedMessageException(
  911. result).asInvalidProtocolBufferException();
  912. }
  913. return result;
  914. }
  915. public com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response buildPartial() {
  916. com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response result = new com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response(this);
  917. int from_bitField0_ = bitField0_;
  918. int to_bitField0_ = 0;
  919. if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
  920. to_bitField0_ |= 0x00000001;
  921. }
  922. result.responseProto_ = responseProto_;
  923. if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
  924. to_bitField0_ |= 0x00000002;
  925. }
  926. result.error_ = error_;
  927. if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
  928. to_bitField0_ |= 0x00000004;
  929. }
  930. result.callback_ = callback_;
  931. if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
  932. to_bitField0_ |= 0x00000008;
  933. }
  934. result.errorReason_ = errorReason_;
  935. result.bitField0_ = to_bitField0_;
  936. onBuilt();
  937. return result;
  938. }
  939. public Builder mergeFrom(com.google.protobuf.Message other) {
  940. if (other instanceof com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response) {
  941. return mergeFrom((com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response)other);
  942. } else {
  943. super.mergeFrom(other);
  944. return this;
  945. }
  946. }
  947. public Builder mergeFrom(com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response other) {
  948. if (other == com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response.getDefaultInstance()) return this;
  949. if (other.hasResponseProto()) {
  950. setResponseProto(other.getResponseProto());
  951. }
  952. if (other.hasError()) {
  953. setError(other.getError());
  954. }
  955. if (other.hasCallback()) {
  956. setCallback(other.getCallback());
  957. }
  958. if (other.hasErrorReason()) {
  959. setErrorReason(other.getErrorReason());
  960. }
  961. this.mergeUnknownFields(other.getUnknownFields());
  962. return this;
  963. }
  964. public final boolean isInitialized() {
  965. return true;
  966. }
  967. public Builder mergeFrom(
  968. com.google.protobuf.CodedInputStream input,
  969. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  970. throws java.io.IOException {
  971. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  972. com.google.protobuf.UnknownFieldSet.newBuilder(
  973. this.getUnknownFields());
  974. while (true) {
  975. int tag = input.readTag();
  976. switch (tag) {
  977. case 0:
  978. this.setUnknownFields(unknownFields.build());
  979. onChanged();
  980. return this;
  981. default: {
  982. if (!parseUnknownField(input, unknownFields,
  983. extensionRegistry, tag)) {
  984. this.setUnknownFields(unknownFields.build());
  985. onChanged();
  986. return this;
  987. }
  988. break;
  989. }
  990. case 10: {
  991. bitField0_ |= 0x00000001;
  992. responseProto_ = input.readBytes();
  993. break;
  994. }
  995. case 18: {
  996. bitField0_ |= 0x00000002;
  997. error_ = input.readBytes();
  998. break;
  999. }
  1000. case 24: {
  1001. bitField0_ |= 0x00000004;
  1002. callback_ = input.readBool();
  1003. break;
  1004. }
  1005. case 32: {
  1006. int rawValue = input.readEnum();
  1007. com.googlecode.protobuf.socketrpc.SocketRpcProtos.ErrorReason value = com.googlecode.protobuf.socketrpc.SocketRpcProtos.ErrorReason.valueOf(rawValue);
  1008. if (value == null) {
  1009. unknownFields.mergeVarintField(4, rawValue);
  1010. } else {
  1011. bitField0_ |= 0x00000008;
  1012. errorReason_ = value;
  1013. }
  1014. break;
  1015. }
  1016. }
  1017. }
  1018. }
  1019. private int bitField0_;
  1020. // optional bytes response_proto = 1;
  1021. private com.google.protobuf.ByteString responseProto_ = com.google.protobuf.ByteString.EMPTY;
  1022. public boolean hasResponseProto() {
  1023. return ((bitField0_ & 0x00000001) == 0x00000001);
  1024. }
  1025. public com.google.protobuf.ByteString getResponseProto() {
  1026. return responseProto_;
  1027. }
  1028. public Builder setResponseProto(com.google.protobuf.ByteString value) {
  1029. if (value == null) {
  1030. throw new NullPointerException();
  1031. }
  1032. bitField0_ |= 0x00000001;
  1033. responseProto_ = value;
  1034. onChanged();
  1035. return this;
  1036. }
  1037. public Builder clearResponseProto() {
  1038. bitField0_ = (bitField0_ & ~0x00000001);
  1039. responseProto_ = getDefaultInstance().getResponseProto();
  1040. onChanged();
  1041. return this;
  1042. }
  1043. // optional string error = 2;
  1044. private Object error_ = "";
  1045. public boolean hasError() {
  1046. return ((bitField0_ & 0x00000002) == 0x00000002);
  1047. }
  1048. public String getError() {
  1049. Object ref = error_;
  1050. if (!(ref instanceof String)) {
  1051. String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
  1052. error_ = s;
  1053. return s;
  1054. } else {
  1055. return (String) ref;
  1056. }
  1057. }
  1058. public Builder setError(String value) {
  1059. if (value == null) {
  1060. throw new NullPointerException();
  1061. }
  1062. bitField0_ |= 0x00000002;
  1063. error_ = value;
  1064. onChanged();
  1065. return this;
  1066. }
  1067. public Builder clearError() {
  1068. bitField0_ = (bitField0_ & ~0x00000002);
  1069. error_ = getDefaultInstance().getError();
  1070. onChanged();
  1071. return this;
  1072. }
  1073. void setError(com.google.protobuf.ByteString value) {
  1074. bitField0_ |= 0x00000002;
  1075. error_ = value;
  1076. onChanged();
  1077. }
  1078. // optional bool callback = 3 [default = false];
  1079. private boolean callback_ ;
  1080. public boolean hasCallback() {
  1081. return ((bitField0_ & 0x00000004) == 0x00000004);
  1082. }
  1083. public boolean getCallback() {
  1084. return callback_;
  1085. }
  1086. public Builder setCallback(boolean value) {
  1087. bitField0_ |= 0x00000004;
  1088. callback_ = value;
  1089. onChanged();
  1090. return this;
  1091. }
  1092. public Builder clearCallback() {
  1093. bitField0_ = (bitField0_ & ~0x00000004);
  1094. callback_ = false;
  1095. onChanged();
  1096. return this;
  1097. }
  1098. // optional .protobuf.socketrpc.ErrorReason error_reason = 4;
  1099. private com.googlecode.protobuf.socketrpc.SocketRpcProtos.ErrorReason errorReason_ = com.googlecode.protobuf.socketrpc.SocketRpcProtos.ErrorReason.BAD_REQUEST_DATA;
  1100. public boolean hasErrorReason() {
  1101. return ((bitField0_ & 0x00000008) == 0x00000008);
  1102. }
  1103. public com.googlecode.protobuf.socketrpc.SocketRpcProtos.ErrorReason getErrorReason() {
  1104. return errorReason_;
  1105. }
  1106. public Builder setErrorReason(com.googlecode.protobuf.socketrpc.SocketRpcProtos.ErrorReason value) {
  1107. if (value == null) {
  1108. throw new NullPointerException();
  1109. }
  1110. bitField0_ |= 0x00000008;
  1111. errorReason_ = value;
  1112. onChanged();
  1113. return this;
  1114. }
  1115. public Builder clearErrorReason() {
  1116. bitField0_ = (bitField0_ & ~0x00000008);
  1117. errorReason_ = com.googlecode.protobuf.socketrpc.SocketRpcProtos.ErrorReason.BAD_REQUEST_DATA;
  1118. onChanged();
  1119. return this;
  1120. }
  1121. // @@protoc_insertion_point(builder_scope:protobuf.socketrpc.Response)
  1122. }
  1123. static {
  1124. defaultInstance = new Response(true);
  1125. defaultInstance.initFields();
  1126. }
  1127. // @@protoc_insertion_point(class_scope:protobuf.socketrpc.Response)
  1128. }
  1129. private static com.google.protobuf.Descriptors.Descriptor
  1130. internal_static_protobuf_socketrpc_Request_descriptor;
  1131. private static
  1132. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1133. internal_static_protobuf_socketrpc_Request_fieldAccessorTable;
  1134. private static com.google.protobuf.Descriptors.Descriptor
  1135. internal_static_protobuf_socketrpc_Response_descriptor;
  1136. private static
  1137. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  1138. internal_static_protobuf_socketrpc_Response_fieldAccessorTable;
  1139. public static com.google.protobuf.Descriptors.FileDescriptor
  1140. getDescriptor() {
  1141. return descriptor;
  1142. }
  1143. private static com.google.protobuf.Descriptors.FileDescriptor
  1144. descriptor;
  1145. static {
  1146. java.lang.String[] descriptorData = {
  1147. "\n\017proto/rpc.proto\022\022protobuf.socketrpc\"K\n" +
  1148. "\007Request\022\024\n\014service_name\030\001 \002(\t\022\023\n\013method" +
  1149. "_name\030\002 \002(\t\022\025\n\rrequest_proto\030\003 \002(\014\"\201\001\n\010R" +
  1150. "esponse\022\026\n\016response_proto\030\001 \001(\014\022\r\n\005error" +
  1151. "\030\002 \001(\t\022\027\n\010callback\030\003 \001(\010:\005false\0225\n\014error" +
  1152. "_reason\030\004 \001(\0162\037.protobuf.socketrpc.Error" +
  1153. "Reason*\331\001\n\013ErrorReason\022\024\n\020BAD_REQUEST_DA" +
  1154. "TA\020\000\022\025\n\021BAD_REQUEST_PROTO\020\001\022\025\n\021SERVICE_N" +
  1155. "OT_FOUND\020\002\022\024\n\020METHOD_NOT_FOUND\020\003\022\r\n\tRPC_" +
  1156. "ERROR\020\004\022\016\n\nRPC_FAILED\020\005\022\031\n\025INVALID_REQUE",
  1157. "ST_PROTO\020\006\022\026\n\022BAD_RESPONSE_PROTO\020\007\022\020\n\014UN" +
  1158. "KNOWN_HOST\020\010\022\014\n\010IO_ERROR\020\tB4\n!com.google" +
  1159. "code.protobuf.socketrpcB\017SocketRpcProtos"
  1160. };
  1161. com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
  1162. new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
  1163. public com.google.protobuf.ExtensionRegistry assignDescriptors(
  1164. com.google.protobuf.Descriptors.FileDescriptor root) {
  1165. descriptor = root;
  1166. internal_static_protobuf_socketrpc_Request_descriptor =
  1167. getDescriptor().getMessageTypes().get(0);
  1168. internal_static_protobuf_socketrpc_Request_fieldAccessorTable = new
  1169. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  1170. internal_static_protobuf_socketrpc_Request_descriptor,
  1171. new java.lang.String[] { "ServiceName", "MethodName", "RequestProto", },
  1172. com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request.class,
  1173. com.googlecode.protobuf.socketrpc.SocketRpcProtos.Request.Builder.class);
  1174. internal_static_protobuf_socketrpc_Response_descriptor =
  1175. getDescriptor().getMessageTypes().get(1);
  1176. internal_static_protobuf_socketrpc_Response_fieldAccessorTable = new
  1177. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  1178. internal_static_protobuf_socketrpc_Response_descriptor,
  1179. new java.lang.String[] { "ResponseProto", "Error", "Callback", "ErrorReason", },
  1180. com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response.class,
  1181. com.googlecode.protobuf.socketrpc.SocketRpcProtos.Response.Builder.class);
  1182. return null;
  1183. }
  1184. };
  1185. com.google.protobuf.Descriptors.FileDescriptor
  1186. .internalBuildGeneratedFileFrom(descriptorData,
  1187. new com.google.protobuf.Descriptors.FileDescriptor[] {
  1188. }, assigner);
  1189. }
  1190. // @@protoc_insertion_point(outer_class_scope)
  1191. }