PageRenderTime 1186ms CodeModel.GetById 32ms RepoModel.GetById 1ms app.codeStats 0ms

/JGameSocketServer/src/main/java/com/glu/rpc/service/UserProto.java

http://flex-mmorpg-server.googlecode.com/
Java | 407 lines | 359 code | 39 blank | 9 comment | 32 complexity | 689837de367ab53a28a56f87dc979ec5 MD5 | raw file
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. package com.glu.rpc.service;
  3. import com.google.protobuf.UninitializedMessageException;
  4. public final class UserProto {
  5. private UserProto() {}
  6. public static void registerAllExtensions(
  7. com.google.protobuf.ExtensionRegistry registry) {
  8. }
  9. public static final class User extends
  10. com.google.protobuf.GeneratedMessage {
  11. // Use User.newBuilder() to construct.
  12. private User() {}
  13. private static final User defaultInstance = new User();
  14. public static User getDefaultInstance() {
  15. return defaultInstance;
  16. }
  17. public User getDefaultInstanceForType() {
  18. return defaultInstance;
  19. }
  20. public static final com.google.protobuf.Descriptors.Descriptor
  21. getDescriptor() {
  22. return com.glu.rpc.service.UserProto.internal_static_com_glu_rpc_service_User_descriptor;
  23. }
  24. protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
  25. internalGetFieldAccessorTable() {
  26. return com.glu.rpc.service.UserProto.internal_static_com_glu_rpc_service_User_fieldAccessorTable;
  27. }
  28. // optional string userName = 1;
  29. public static final int USERNAME_FIELD_NUMBER = 1;
  30. private boolean hasUserName;
  31. private java.lang.String userName_ = "";
  32. public boolean hasUserName() { return hasUserName; }
  33. public java.lang.String getUserName() { return userName_; }
  34. // optional string password = 2;
  35. public static final int PASSWORD_FIELD_NUMBER = 2;
  36. private boolean hasPassword;
  37. private java.lang.String password_ = "";
  38. public boolean hasPassword() { return hasPassword; }
  39. public java.lang.String getPassword() { return password_; }
  40. // optional string email = 3;
  41. public static final int EMAIL_FIELD_NUMBER = 3;
  42. private boolean hasEmail;
  43. private java.lang.String email_ = "";
  44. public boolean hasEmail() { return hasEmail; }
  45. public java.lang.String getEmail() { return email_; }
  46. public final boolean isInitialized() {
  47. return true;
  48. }
  49. public void writeTo(com.google.protobuf.CodedOutputStream output)
  50. throws java.io.IOException {
  51. if (hasUserName()) {
  52. output.writeString(1, getUserName());
  53. }
  54. if (hasPassword()) {
  55. output.writeString(2, getPassword());
  56. }
  57. if (hasEmail()) {
  58. output.writeString(3, getEmail());
  59. }
  60. getUnknownFields().writeTo(output);
  61. }
  62. private int memoizedSerializedSize = -1;
  63. public int getSerializedSize() {
  64. int size = memoizedSerializedSize;
  65. if (size != -1) return size;
  66. size = 0;
  67. if (hasUserName()) {
  68. size += com.google.protobuf.CodedOutputStream
  69. .computeStringSize(1, getUserName());
  70. }
  71. if (hasPassword()) {
  72. size += com.google.protobuf.CodedOutputStream
  73. .computeStringSize(2, getPassword());
  74. }
  75. if (hasEmail()) {
  76. size += com.google.protobuf.CodedOutputStream
  77. .computeStringSize(3, getEmail());
  78. }
  79. size += getUnknownFields().getSerializedSize();
  80. memoizedSerializedSize = size;
  81. return size;
  82. }
  83. public static com.glu.rpc.service.UserProto.User parseFrom(
  84. com.google.protobuf.ByteString data)
  85. throws com.google.protobuf.InvalidProtocolBufferException {
  86. return newBuilder().mergeFrom(data).buildParsed();
  87. }
  88. public static com.glu.rpc.service.UserProto.User parseFrom(
  89. com.google.protobuf.ByteString data,
  90. com.google.protobuf.ExtensionRegistry extensionRegistry)
  91. throws com.google.protobuf.InvalidProtocolBufferException {
  92. return newBuilder().mergeFrom(data, extensionRegistry)
  93. .buildParsed();
  94. }
  95. public static com.glu.rpc.service.UserProto.User parseFrom(byte[] data)
  96. throws com.google.protobuf.InvalidProtocolBufferException {
  97. return newBuilder().mergeFrom(data).buildParsed();
  98. }
  99. public static com.glu.rpc.service.UserProto.User parseFrom(
  100. byte[] data,
  101. com.google.protobuf.ExtensionRegistry extensionRegistry)
  102. throws com.google.protobuf.InvalidProtocolBufferException {
  103. return newBuilder().mergeFrom(data, extensionRegistry)
  104. .buildParsed();
  105. }
  106. public static com.glu.rpc.service.UserProto.User parseFrom(java.io.InputStream input)
  107. throws java.io.IOException {
  108. return newBuilder().mergeFrom(input).buildParsed();
  109. }
  110. public static com.glu.rpc.service.UserProto.User parseFrom(
  111. java.io.InputStream input,
  112. com.google.protobuf.ExtensionRegistry extensionRegistry)
  113. throws java.io.IOException {
  114. return newBuilder().mergeFrom(input, extensionRegistry)
  115. .buildParsed();
  116. }
  117. public static com.glu.rpc.service.UserProto.User parseDelimitedFrom(java.io.InputStream input)
  118. throws java.io.IOException {
  119. return newBuilder().mergeDelimitedFrom(input).buildParsed();
  120. }
  121. public static com.glu.rpc.service.UserProto.User parseDelimitedFrom(
  122. java.io.InputStream input,
  123. com.google.protobuf.ExtensionRegistry extensionRegistry)
  124. throws java.io.IOException {
  125. return newBuilder().mergeDelimitedFrom(input, extensionRegistry)
  126. .buildParsed();
  127. }
  128. public static com.glu.rpc.service.UserProto.User parseFrom(
  129. com.google.protobuf.CodedInputStream input)
  130. throws java.io.IOException {
  131. return newBuilder().mergeFrom(input).buildParsed();
  132. }
  133. public static com.glu.rpc.service.UserProto.User parseFrom(
  134. com.google.protobuf.CodedInputStream input,
  135. com.google.protobuf.ExtensionRegistry extensionRegistry)
  136. throws java.io.IOException {
  137. return newBuilder().mergeFrom(input, extensionRegistry)
  138. .buildParsed();
  139. }
  140. public static Builder newBuilder() { return Builder.create(); }
  141. public Builder newBuilderForType() { return newBuilder(); }
  142. public static Builder newBuilder(com.glu.rpc.service.UserProto.User prototype) {
  143. return newBuilder().mergeFrom(prototype);
  144. }
  145. public Builder toBuilder() { return newBuilder(this); }
  146. public static final class Builder extends
  147. com.google.protobuf.GeneratedMessage.Builder<Builder> {
  148. private com.glu.rpc.service.UserProto.User result;
  149. // Construct using com.glu.rpc.service.UserProto.User.newBuilder()
  150. private Builder() {}
  151. private static Builder create() {
  152. Builder builder = new Builder();
  153. builder.result = new com.glu.rpc.service.UserProto.User();
  154. return builder;
  155. }
  156. protected com.glu.rpc.service.UserProto.User internalGetResult() {
  157. return result;
  158. }
  159. public Builder clear() {
  160. if (result == null) {
  161. throw new IllegalStateException(
  162. "Cannot call clear() after build().");
  163. }
  164. result = new com.glu.rpc.service.UserProto.User();
  165. return this;
  166. }
  167. public Builder clone() {
  168. return create().mergeFrom(result);
  169. }
  170. public com.google.protobuf.Descriptors.Descriptor
  171. getDescriptorForType() {
  172. return com.glu.rpc.service.UserProto.User.getDescriptor();
  173. }
  174. public com.glu.rpc.service.UserProto.User getDefaultInstanceForType() {
  175. return com.glu.rpc.service.UserProto.User.getDefaultInstance();
  176. }
  177. public boolean isInitialized() {
  178. return result.isInitialized();
  179. }
  180. public com.glu.rpc.service.UserProto.User build() {
  181. if (result != null && !isInitialized()) {
  182. throw new UninitializedMessageException(result);
  183. }
  184. return buildPartial();
  185. }
  186. private com.glu.rpc.service.UserProto.User buildParsed()
  187. throws com.google.protobuf.InvalidProtocolBufferException {
  188. if (!isInitialized()) {
  189. throw new UninitializedMessageException(
  190. result).asInvalidProtocolBufferException();
  191. }
  192. return buildPartial();
  193. }
  194. public com.glu.rpc.service.UserProto.User buildPartial() {
  195. if (result == null) {
  196. throw new IllegalStateException(
  197. "build() has already been called on this Builder.");
  198. }
  199. com.glu.rpc.service.UserProto.User returnMe = result;
  200. result = null;
  201. return returnMe;
  202. }
  203. public Builder mergeFrom(com.google.protobuf.Message other) {
  204. if (other instanceof com.glu.rpc.service.UserProto.User) {
  205. return mergeFrom((com.glu.rpc.service.UserProto.User)other);
  206. } else {
  207. super.mergeFrom(other);
  208. return this;
  209. }
  210. }
  211. public Builder mergeFrom(com.glu.rpc.service.UserProto.User other) {
  212. if (other == com.glu.rpc.service.UserProto.User.getDefaultInstance()) return this;
  213. if (other.hasUserName()) {
  214. setUserName(other.getUserName());
  215. }
  216. if (other.hasPassword()) {
  217. setPassword(other.getPassword());
  218. }
  219. if (other.hasEmail()) {
  220. setEmail(other.getEmail());
  221. }
  222. this.mergeUnknownFields(other.getUnknownFields());
  223. return this;
  224. }
  225. public Builder mergeFrom(
  226. com.google.protobuf.CodedInputStream input,
  227. com.google.protobuf.ExtensionRegistry extensionRegistry)
  228. throws java.io.IOException {
  229. com.google.protobuf.UnknownFieldSet.Builder unknownFields =
  230. com.google.protobuf.UnknownFieldSet.newBuilder(
  231. this.getUnknownFields());
  232. while (true) {
  233. int tag = input.readTag();
  234. switch (tag) {
  235. case 0:
  236. this.setUnknownFields(unknownFields.build());
  237. return this;
  238. default: {
  239. if (!parseUnknownField(input, unknownFields,
  240. extensionRegistry, tag)) {
  241. this.setUnknownFields(unknownFields.build());
  242. return this;
  243. }
  244. break;
  245. }
  246. case 10: {
  247. setUserName(input.readString());
  248. break;
  249. }
  250. case 18: {
  251. setPassword(input.readString());
  252. break;
  253. }
  254. case 26: {
  255. setEmail(input.readString());
  256. break;
  257. }
  258. }
  259. }
  260. }
  261. // optional string userName = 1;
  262. public boolean hasUserName() {
  263. return result.hasUserName();
  264. }
  265. public java.lang.String getUserName() {
  266. return result.getUserName();
  267. }
  268. public Builder setUserName(java.lang.String value) {
  269. if (value == null) {
  270. throw new NullPointerException();
  271. }
  272. result.hasUserName = true;
  273. result.userName_ = value;
  274. return this;
  275. }
  276. public Builder clearUserName() {
  277. result.hasUserName = false;
  278. result.userName_ = getDefaultInstance().getUserName();
  279. return this;
  280. }
  281. // optional string password = 2;
  282. public boolean hasPassword() {
  283. return result.hasPassword();
  284. }
  285. public java.lang.String getPassword() {
  286. return result.getPassword();
  287. }
  288. public Builder setPassword(java.lang.String value) {
  289. if (value == null) {
  290. throw new NullPointerException();
  291. }
  292. result.hasPassword = true;
  293. result.password_ = value;
  294. return this;
  295. }
  296. public Builder clearPassword() {
  297. result.hasPassword = false;
  298. result.password_ = getDefaultInstance().getPassword();
  299. return this;
  300. }
  301. // optional string email = 3;
  302. public boolean hasEmail() {
  303. return result.hasEmail();
  304. }
  305. public java.lang.String getEmail() {
  306. return result.getEmail();
  307. }
  308. public Builder setEmail(java.lang.String value) {
  309. if (value == null) {
  310. throw new NullPointerException();
  311. }
  312. result.hasEmail = true;
  313. result.email_ = value;
  314. return this;
  315. }
  316. public Builder clearEmail() {
  317. result.hasEmail = false;
  318. result.email_ = getDefaultInstance().getEmail();
  319. return this;
  320. }
  321. }
  322. static {
  323. com.glu.rpc.service.UserProto.getDescriptor();
  324. }
  325. static {
  326. com.glu.rpc.service.UserProto.internalForceInit();
  327. }
  328. }
  329. private static com.google.protobuf.Descriptors.Descriptor
  330. internal_static_com_glu_rpc_service_User_descriptor;
  331. private static
  332. com.google.protobuf.GeneratedMessage.FieldAccessorTable
  333. internal_static_com_glu_rpc_service_User_fieldAccessorTable;
  334. public static com.google.protobuf.Descriptors.FileDescriptor
  335. getDescriptor() {
  336. return descriptor;
  337. }
  338. private static com.google.protobuf.Descriptors.FileDescriptor
  339. descriptor;
  340. static {
  341. java.lang.String descriptorData =
  342. "\n\nuser.proto\022\023com.glu.rpc.service\"9\n\004Use" +
  343. "r\022\020\n\010userName\030\001 \001(\t\022\020\n\010password\030\002 \001(\t\022\r\n" +
  344. "\005email\030\003 \001(\tB\"\n\023com.glu.rpc.serviceB\tUse" +
  345. "rProtoH\001";
  346. com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
  347. new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
  348. public com.google.protobuf.ExtensionRegistry assignDescriptors(
  349. com.google.protobuf.Descriptors.FileDescriptor root) {
  350. descriptor = root;
  351. internal_static_com_glu_rpc_service_User_descriptor =
  352. getDescriptor().getMessageTypes().get(0);
  353. internal_static_com_glu_rpc_service_User_fieldAccessorTable = new
  354. com.google.protobuf.GeneratedMessage.FieldAccessorTable(
  355. internal_static_com_glu_rpc_service_User_descriptor,
  356. new java.lang.String[] { "UserName", "Password", "Email", },
  357. com.glu.rpc.service.UserProto.User.class,
  358. com.glu.rpc.service.UserProto.User.Builder.class);
  359. return null;
  360. }
  361. };
  362. com.google.protobuf.Descriptors.FileDescriptor
  363. .internalBuildGeneratedFileFrom(descriptorData,
  364. new com.google.protobuf.Descriptors.FileDescriptor[] {
  365. }, assigner);
  366. }
  367. public static void internalForceInit() {}
  368. }